Skip to content

Commit d63494f

Browse files
authored
Merge pull request #530 from flask-dashboard/fix/CircularDependencyError
fixing the TypeError: CircularDependencyError.__init__() missing 3 re…
2 parents 440f129 + 3efa2fa commit d63494f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flask_monitoringdashboard/core/exceptions/exception_collector.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def _get_copy_of_exception(e: BaseException):
6262
try:
6363
new_exc = copy.deepcopy(e)
6464
except Exception:
65-
new_exc = e.__class__()
65+
# For exceptions that can't be instantiated without args, just return the original
66+
return e
6667

6768
if e.__traceback__:
6869
return new_exc.with_traceback(e.__traceback__)

0 commit comments

Comments
 (0)