mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-27 11:19:21 -04:00
Merge pull request #2063 from alphagov/pyup-update-flask-0.12.2-to-1.0.2
Update flask to 1.0.2
This commit is contained in:
@@ -36,6 +36,7 @@ from notifications_utils.formatters import formatted_list
|
||||
from notifications_utils.sanitise_text import SanitiseASCII
|
||||
from werkzeug.exceptions import abort
|
||||
from werkzeug.local import LocalProxy
|
||||
from werkzeug.routing import RequestRedirect
|
||||
|
||||
from app import proxy_fix
|
||||
from app.config import configs
|
||||
@@ -532,6 +533,10 @@ def register_errorhandlers(application): # noqa (C901 too complex)
|
||||
error_code = 500
|
||||
return _error_response(error_code)
|
||||
|
||||
@application.errorhandler(400)
|
||||
def handle_400(error):
|
||||
return _error_response(400)
|
||||
|
||||
@application.errorhandler(410)
|
||||
def handle_gone(error):
|
||||
return _error_response(410)
|
||||
@@ -579,6 +584,10 @@ def register_errorhandlers(application): # noqa (C901 too complex)
|
||||
), 400)
|
||||
return useful_headers_after_request(resp)
|
||||
|
||||
@application.errorhandler(RequestRedirect)
|
||||
def handle_301(error):
|
||||
return error
|
||||
|
||||
@application.errorhandler(500)
|
||||
@application.errorhandler(Exception)
|
||||
def handle_bad_request(error):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
ago==0.0.92
|
||||
Flask==0.12.2
|
||||
Flask==1.0.2
|
||||
Flask-WTF==0.14.2
|
||||
Flask-Login==0.4.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user