Hello!
I'd like to discuss my PR  https://github.com/web2py/py4web/pull/123

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)

   

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/afb5d9e4-4a6d-4d74-8bb6-1ac45e35af89%40googlegroups.com.

Reply via email to