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

Don't send notifications for 405 errors

parent a422a37e
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,10 @@ def handle_errors(endpoint, text, code, *errors, **epargs): ...@@ -104,6 +104,10 @@ def handle_errors(endpoint, text, code, *errors, **epargs):
def handle_not_found(e=None): #pylint: disable=unused-argument def handle_not_found(e=None): #pylint: disable=unused-argument
return render_endpoint('index', 'Diese Seite existiert nicht!'), 404 return render_endpoint('index', 'Diese Seite existiert nicht!'), 404
@app.errorhandler(405)
def handle_method_not_allowed(e=None): #pylint: disable=unused-argument
return render_endpoint('index', 'Diese Seite existiert nicht!'), 405
@app.errorhandler(500) @app.errorhandler(500)
@app.errorhandler(Exception) @app.errorhandler(Exception)
def handle_internal_error(e): #pylint: disable=unused-argument def handle_internal_error(e): #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