Skip to content

Commit

Permalink
Show traceback info during IssueTracker health check
Browse files Browse the repository at this point in the history
this will make it easier to debug issues
  • Loading branch information
atodorov committed Aug 30, 2023
1 parent 39d8a71 commit a663c2a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tcms/testcases/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pylint: disable=no-self-use

import traceback

from django import forms
from django.conf import settings
from django.contrib import admin, messages
Expand Down Expand Up @@ -214,16 +216,17 @@ def save_model(self, request, obj, form, change):
messages.INFO,
details,
)
except Exception as err: # pylint: disable=broad-except
except Exception: # pylint: disable=broad-except
messages.add_message(
request,
messages.ERROR,
_("Issue Tracker configuration check failed"),
)
# show the actual exception with traceback b/c it can help debug failures
messages.add_message(
request,
messages.ERROR,
err,
traceback.format_exc(),
)


Expand Down

0 comments on commit a663c2a

Please sign in to comment.