Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 5.3.0 - 2025-06-19

- fix: safely handle exception values

# 5.2.0 - 2025-06-19

- feat: construct artificial stack traces if no traceback is available on a captured exception
Expand Down
6 changes: 4 additions & 2 deletions posthog/exception_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,14 @@ def get_errno(exc_value):

def get_error_message(exc_value):
# type: (Optional[BaseException]) -> str
return (
message = (
getattr(exc_value, "message", "")
or getattr(exc_value, "detail", "")
or safe_str(exc_value)
or exc_value
)

return safe_str(message)


def single_exception_from_error_tuple(
exc_type, # type: Optional[type]
Expand Down
2 changes: 1 addition & 1 deletion posthog/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = "5.2.0"
VERSION = "5.3.0"

if __name__ == "__main__":
print(VERSION, end="") # noqa: T201
Loading