Skip to content

Commit

Permalink
hide exception without args
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Jan 24, 2025
1 parent 593f8ca commit 120b1ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/argus/htmx/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ class HtmxMessageMiddleware(MiddlewareMixin):
TEMPLATE = "messages/_notification_messages_htmx_append.html"

def process_exception(self, request, exception):
error_msg = f"500 Internal Server Error: {exception}"
error_msg = "500 Internal Server Error"
if str(exception):
error_msg += f": {exception}"
messages.error(request, error_msg)
LOG.error(error_msg)
return None
Expand Down

0 comments on commit 120b1ef

Please sign in to comment.