Skip to content

Commit 1421fee

Browse files
Update flask_rest_jsonapi/decorators.py
Use get function to prevent KeyError when PROPAGATE_EXCEPTIONS is not set Co-Authored-By: Areeb Jamal <[email protected]>
1 parent 68d0faa commit 1421fee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_rest_jsonapi/decorators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def wrapper(*args, **kwargs):
7979
e.status,
8080
headers)
8181
except Exception as e:
82-
if current_app.config['DEBUG'] is True or current_app.config['PROPAGATE_EXCEPTIONS'] is True:
82+
if current_app.config['DEBUG'] is True or current_app.config.get('PROPAGATE_EXCEPTIONS') is True:
8383
raise e
8484

8585
if 'sentry' in current_app.extensions:

0 commit comments

Comments
 (0)