I am trying to understand the difference b/w https://developer.android.com/reference/android/webkit/WebViewClient.html
onRecievedHttpError and onRecievedError.
For me I always get both of these callbacks for all errors in my webpage? Why we have two callbacks then.
onReceivedError()
Report web resource loading error to the host application. These errors usually indicate inability to connect to the server.
It's about network/server errors. The errors are not HTTP errors but are unrecoverable resource errors (file not found, no network connection, server not found for the main resource, etc.). If there is a network error, there cannot be a HTTP error code transmitted.
onReceivedHttpError()
Notify the host application that an HTTP error has been received from the server while loading a resource. HTTP errors have status codes >= 400.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With