Skip to content

Commit

Permalink
Log caught werkzeug errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jtc42 committed Jul 21, 2020
1 parent 3620a1e commit d1c28b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/labthings/httperrorhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from werkzeug.exceptions import default_exceptions
from werkzeug.exceptions import HTTPException

import logging

class SerializedExceptionHandler:

Expand All @@ -21,6 +22,8 @@ def std_handler(self, error):
:param error:
"""
logging.error(error)

if isinstance(error, HTTPException):
message = error.description
elif hasattr(error, "message"):
Expand Down

0 comments on commit d1c28b2

Please sign in to comment.