diff --git a/app/errors.py b/app/errors.py index 67448e1fb..09ff8d633 100644 --- a/app/errors.py +++ b/app/errors.py @@ -111,5 +111,8 @@ def register_errors(blueprint): @blueprint.app_errorhandler(500) @blueprint.errorhandler(Exception) def internal_server_error(e): + # if e is a werkzeug InternalServerError then it may wrap the original exception. For more details see: + # https://flask.palletsprojects.com/en/1.1.x/errorhandling/?highlight=internalservererror#unhandled-exceptions + e = getattr(e, 'original_exception', e) current_app.logger.exception(e) return jsonify(result='error', message="Internal server error"), 500 diff --git a/requirements-app.txt b/requirements-app.txt index a87eb2ed8..f628c38e6 100644 --- a/requirements-app.txt +++ b/requirements-app.txt @@ -6,19 +6,19 @@ celery==3.1.26.post2 # pyup: <4 docopt==0.6.2 Flask-Bcrypt==0.7.1 flask-marshmallow==0.10.1 -Flask-Migrate==2.4.0 +Flask-Migrate==2.5.2 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 -Flask==1.0.2 +Flask==1.1.1 click-datetime==0.2 -eventlet==0.24.1 +eventlet==0.25.1 gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 -jsonschema==3.0.1 -marshmallow-sqlalchemy==0.16.3 -marshmallow==2.19.2 -psycopg2-binary==2.8.2 +jsonschema==3.0.2 +marshmallow-sqlalchemy==0.17.0 +marshmallow==2.20.2 # pyup: <3 throws errors +psycopg2-binary==2.8.3 PyJWT==1.7.1 -SQLAlchemy==1.3.3 +SQLAlchemy==1.3.8 notifications-python-client==5.3.0 @@ -29,6 +29,6 @@ awscli-cwlogs>=1.4,<1.5 # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 -git+https://github.com/alphagov/notifications-utils.git@33.2.9#egg=notifications-utils==33.2.9 +git+https://github.com/alphagov/notifications-utils.git@34.0.1#egg=notifications-utils==34.0.1 git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3 diff --git a/requirements.txt b/requirements.txt index 8d4126a7c..b74c9de73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,19 +8,19 @@ celery==3.1.26.post2 # pyup: <4 docopt==0.6.2 Flask-Bcrypt==0.7.1 flask-marshmallow==0.10.1 -Flask-Migrate==2.4.0 +Flask-Migrate==2.5.2 git+https://github.com/mitsuhiko/flask-sqlalchemy.git@500e732dd1b975a56ab06a46bd1a20a21e682262#egg=Flask-SQLAlchemy==2.3.2.dev20190108 -Flask==1.0.2 +Flask==1.1.1 click-datetime==0.2 -eventlet==0.24.1 +eventlet==0.25.1 gunicorn==19.7.1 # pyup: ignore, >19.8 breaks eventlet patching iso8601==0.1.12 -jsonschema==3.0.1 -marshmallow-sqlalchemy==0.16.3 -marshmallow==2.19.2 -psycopg2-binary==2.8.2 +jsonschema==3.0.2 +marshmallow-sqlalchemy==0.17.0 +marshmallow==2.20.2 # pyup: <3 throws errors +psycopg2-binary==2.8.3 PyJWT==1.7.1 -SQLAlchemy==1.3.3 +SQLAlchemy==1.3.8 notifications-python-client==5.3.0 @@ -31,27 +31,27 @@ awscli-cwlogs>=1.4,<1.5 # Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default itsdangerous==0.24 # pyup: <1.0.0 -git+https://github.com/alphagov/notifications-utils.git@33.2.9#egg=notifications-utils==33.2.9 +git+https://github.com/alphagov/notifications-utils.git@34.0.1#egg=notifications-utils==34.0.1 git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3 ## The following requirements were added by pip freeze: -alembic==1.0.11 +alembic==1.1.0 amqp==1.4.9 anyjson==0.3.3 attrs==19.1.0 -awscli==1.16.217 +awscli==1.16.231 bcrypt==3.1.7 billiard==3.3.0.23 bleach==3.1.0 boto3==1.6.16 -botocore==1.12.207 +botocore==1.12.221 certifi==2019.6.16 chardet==3.0.4 Click==7.0 colorama==0.3.9 dnspython==1.16.0 -docutils==0.14 +docutils==0.15.2 flask-redis==0.4.0 future==0.17.1 greenlet==0.4.15 @@ -65,7 +65,7 @@ mistune==0.8.4 monotonic==1.5 orderedset==2.0.1 phonenumbers==8.10.13 -pyasn1==0.4.6 +pyasn1==0.4.7 pycparser==2.19 PyPDF2==1.26.0 pyrsistent==0.15.4 @@ -74,7 +74,7 @@ python-editor==1.0.4 python-json-logger==0.1.11 pytz==2019.2 PyYAML==4.2b1 -redis==3.3.7 +redis==3.3.8 requests==2.22.0 rsa==3.4.2 s3transfer==0.2.1