Hello!
The reason:
Currently, if you make an ajax request and expect json-response, in case of any error on the server, py4web returns a response that is an html page with response.status = 200. My PR changes this behavior to the following logic - if there is `application / json` in the http_accept-header, a json is returned that contains the same information as the html error-page with the actual response.status, so the error can be caught using the appropriate callback (this is a more common practice)