Skip to content

Commit

Permalink
Correctly log werkzeug.exceptions.HTTPExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Thom Sentner committed Jul 30, 2021
1 parent 9250f88 commit 43fce79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flask_monitoringdashboard/core/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ def evaluate(route_handler, args, kwargs):
return result, status_code, None

except Exception as e:
return None, 500, e
try:
status_code = e.code
except AttributeError:
status_code = 500
return None, status_code, e


def add_wrapper1(endpoint, fun):
Expand Down

0 comments on commit 43fce79

Please sign in to comment.