Create custom error page for HTTP 4xx and 5xx response codes

User2883 10 months ago • updated by Richard 9 months ago 3

Hi. When loading the homepage our backend-website sometimes respond back with 4xx or 5xx and displays an error page that is not mobile-friendly. We would like to replace it with a custom error page instead. Preferable the same error page we use for custom error page. Could you add this as an new feature?

Might be nice to be able specify which HTTP codes to show different pages. Alternatively any HTTP-code that is not 2xx should show an error page.

Extra note. Error is caused by our service provider and we do not have full control over this.

Under review

The standard WebView method onReceivedError() only gets called for network related errors prior to Android M, so its not possible to identify other response codes without making a secondary request to the page to get the response code (which we won't do). 

Supposedly in Android 6.0 and up we can catch other errors via onReceivedHttpError() however we would need to look into this. This won't be something we can implement quickly I'm afraid.


We've implemented a new setting in a pre-release build called "redirect to custom error page" , with this enabled (also custom error page), if Kiosk Browser receives a 400 or higher response the custom error page is loaded and appended with the querystring ?statuscode=4xx, this can then be read via JavaScript.

No planned release date yet but if you wish to have a pre-release build please let me know.