From 46c1b9b2bbb9b88ea95834e0a7a44b92c4c46f20 Mon Sep 17 00:00:00 2001 From: Landon GB Date: Thu, 15 Dec 2016 12:06:27 -0700 Subject: [PATCH] Set PROPAGATE_EXCEPTIONS = True refs #20 --- flask_jwt_extended/jwt_manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flask_jwt_extended/jwt_manager.py b/flask_jwt_extended/jwt_manager.py index 3913cd84..78c497f3 100644 --- a/flask_jwt_extended/jwt_manager.py +++ b/flask_jwt_extended/jwt_manager.py @@ -50,8 +50,13 @@ def init_app(self, app): """ Register this extension with the flask app """ + # Save this so we can use it later in the extension app.jwt_manager = self + # Set propagate exceptions, so all of these error handlers properly + # work in production + app.config['PROPAGATE_EXCEPTIONS'] = True + @app.errorhandler(NoAuthorizationError) def handle_auth_error(e): return self._unauthorized_callback(str(e))