Skip to content

Commit

Permalink
Exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
NadavTasher committed Feb 1, 2024
1 parent 8635d4b commit 0886ab5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions image/src/backend/router.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import logging
import traceback

# Import flask utilities
Expand Down Expand Up @@ -61,6 +62,9 @@ def wrapper(**kwargs):
if DEBUG:
return traceback.format_exc(), 500

# Log the exception
logging.exception("Exception in %s:", rule)

# Create error response from exception
return str(exception), 500

Expand Down

0 comments on commit 0886ab5

Please sign in to comment.