Skip to content

Commit

Permalink
Merge pull request #204 from sljeff/fix-exception
Browse files Browse the repository at this point in the history
fix exception init
  • Loading branch information
fenngwd authored Nov 1, 2021
2 parents 2f7906c + 0a2226e commit fdad146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sea/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def __init__(self, message=None, *args, **kwargs):
if isinstance(message, (list, dict)):
message = json.dumps(
message, default=str, ensure_ascii=True)
if not isinstance(message, str):
message = str(message)
if message is not None:
if not isinstance(message, str):
message = str(message)
self.details = message
super().__init__(message, *args, **kwargs)

Expand Down

0 comments on commit fdad146

Please sign in to comment.