Assume we need to catch an OperationalError from SQLAlchemy, because the database had gone away and the session needs to be closed like this:
@APP.errorhandler(sqlalchemy.exc.OperationalError)
def handle_operationalerror(error):
SESSION.close_all()
--> now reprocess the request
How can restart the processing of the request from scratch?
Redirecting via a 3xx to the same URL won't help since I'm dealing with an SPA that does not honor 3xx