To keep vistors of my app from seeing error tickets I coded the following
routes.py and put it in web2py's home directory:
routes_onerror = [
(r'init/*', r'/handler/default/error')
,(r'myleonexus/*', r'/handler/default/error')
,(r'*/*', r'/handler/default/error')
]
In case of an erro
Imagine that I have an application called 'myapp' running in my local
web2py server, and I include this in routes.py to manage HTTP errors using
a custom controller (/myapp/portal/error_page):
routes_onerror = [
('myapp/*', '/myapp/portal/error_page'),
]
Then, when somebody access to myap
I have this code in the *app-specific* routes.py
routes_onerror = [
('*/*', '/myapp/static/error.html')
]
I reload routes, but it still prints
invalid function (nothing/here)
I am using:
Version 2.0.9 (2012-09-17 21:37:10) stable
May I know what I am doing wrong?
Thank you.
--
This is an old issue as per:
https://groups.google.com/forum/#!searchin/web2py/404$20/web2py/D7zU8Ssa3OA/BqJW97wr4HwJ
and
https://groups.google.com/forum/#!searchin/web2py/404$20/web2py/Fp0jxzNTVUI/fl7doNG2L5IJ
Also Yarin has created a workaround for it:
http://www.web2pyslices.com/slice/show/152
Hi--
"Friendly error pages" :) may be user-friendly, but they break
requests from non-interactive clients, because those cannot parse the
error pages, and moreover, they will never know that there was an
error (they always get a 200 OK or a 303 SEE OTHER, but never a 400
BAD REQUEST or 401 UNAUTHO
5 matches
Mail list logo