Switch to OIDC authentication
This commit is contained in:
parent
5add39a8a7
commit
9dc0fbb4fe
5 changed files with 88 additions and 81 deletions
17
web/errors.py
Normal file
17
web/errors.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import flask
|
||||
import werkzeug.exceptions
|
||||
|
||||
def init_app(app):
|
||||
@app.errorhandler(werkzeug.exceptions.HTTPException)
|
||||
def http_error(e):
|
||||
return e
|
||||
|
||||
@app.errorhandler(TimeoutError)
|
||||
def timeout_error(e):
|
||||
return flask.render_template('busy.html')
|
||||
|
||||
@app.errorhandler(Exception)
|
||||
def internal_server_error(e):
|
||||
return flask.Response(f'something went catastrophically wrong: {e}',
|
||||
status=500, mimetype='text/plain')
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue