Skip to content
Snippets Groups Projects
Commit a42d9025 authored by Julian Rother's avatar Julian Rother
Browse files

Handler for 400 errors

parent 2817baec
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,10 @@ def handle_errors(endpoint, text, code, *errors, **epargs):
return decorator
return wrapper
@app.errorhandler(400)
def handle_bad_request(e=None): #pylint: disable=unused-argument
return render_endpoint('index', 'Diese Seite existiert nicht!'), 400
@app.errorhandler(404)
@app.route('/invalidpath')
def handle_not_found(e=None): #pylint: disable=unused-argument
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment