How to detect a 404 error in WebView

I have a WebView that I set onError and onLoadEnd . The problem is that when I have a webpage that returns a 404 error not found, I don't get it in the onError handler. I get onLoadEnd , but there is no way to know that it is 404, except for the name.

enter image description here

Is there any way to detect this? I expected this to be handled by an onError .

+5
source share

All Articles