On my server I use a routes.py file to route HTTP errors to static error
pages. e.g.
routes_onerror = [
(r'myapp/400', r'/myapp/error/http400'),
...
In a controller I check user input and then raise HTTP errors if something
is wrong. e.g.
if not request.vars.client_id:
raise HTTP(400, 'client_id parameter is missing')
When I test my code locally I don't have error re-routing and thus I
directly see the message from the http error. When a check goes wrong on
the server only the static error page is shown which is fine for the user.
But for me it is very hard to find out which check went wrong and where the
error was raised.
Is it possible to access the HTTP error body in my error controller? then I
could display it in a hidden element on the error page. Another option
would be if I could somehow avoid the error routing, e.g. by adding a
request parameter (?disable_routes=1) or something like that. Any ideas how
I could do this?
thanks for your help,
Alex
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.