Skip to content

Commit

Permalink
Update exceptions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhang committed May 6, 2024
1 parent ad45554 commit 7901b2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sanic/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def __init__(
)
quiet = quiet or getattr(self.__class__, "quiet", None)
headers = headers or getattr(self.__class__, "headers", {})
if not isinstance(message, str):
# If a `bytes`-like object is provided, normalize it to a string.
if isinstance(message, bytes):
# If a `bytes` object is provided, normalize it to a string.
message = message.decode("utf8")
if message is None:
cls_message = getattr(self.__class__, "message", None)
Expand Down

0 comments on commit 7901b2c

Please sign in to comment.