On Sunday, October 2, 2016 at 7:52:04 AM UTC-4, Luis Valladares wrote: > > Because my application has a microservice architecture, this means there > is another app storing the token in the database and the only thing my > web2py front end does is make a http request to that microservice and > format the received data, but if during that formatting some exception is > raised I lost all the content (in this case the token) that I want to send > in request.cookies, this mean the user still have the old token when the > microservice already have changed that token in their database. >
You could either wrap your web2py code in a try/except to ensure you catch any errors directly, or use routes_onerror in routes.py to route any errors to a separate error handling app/controller (in the latter case, you'll need to make sure the relevant token data have been saved somewhere the error handler can access). Anthony -- 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.

