Where exactly I need to put this file? I have tried
error_message = '<html><body><h1>%s-------</h1></body></html>' error_message_ticket = '''<html><body><h1>Internal error</h1> Ticket issued: <a href="/admin/default/ticket/%(ticket)s" target="_blank">%(ticket)s</a>------</body></html>''' routes_onerror = [ ('init/400', '/backend/default/index'), ('init/*', '/backend/default/index'), ('*/404', '/backend/default/index'), ('*/*', '/backend/error/report') ] error_handler = dict(application='backend', controller='error', function='report') Still no correct message displayed if I cause a 500 server error. Where do I activate it? I mean, even debugging passes over the redirector inside web2py and see nothing on those variables causing normal behaviour on the branch on rewrite.py if status >= 399 and THREAD_LOCAL.routes.routes_onerror: so.... El martes, 6 de septiembre de 2016, 11:17:58 (UTC-5), Anthony escribió: > > http://web2py.com/books/default/chapter/29/04/the-core#Routes-on-error > > Anthony > > On Tuesday, September 6, 2016 at 10:43:19 AM UTC-4, Ty oc wrote: >> >> Still I need to log the ticket issue so we know what is happening (we >> will be watching for errors to show on the admin webapp), but we dont want >> the error to be like the HTML that is always show to the user. >> >> I want to return a one of the following depending on where Im returning >> it (a page in the web app or a request of a service) >> >> >> - for the service >> - {"error":"see ticket xyz"} >> - for the HTML webpage >> - General error, return home "here". >> >> >> >> -- 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. For more options, visit https://groups.google.com/d/optout.