Skip to content

Commit 3778eae

Browse files
authored
fix(err): just check if the passed exceptions is a BaseException (#261)
* just check if it's an exception first * version bump
1 parent 52df246 commit 3778eae

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.10.0 - 2025-06-13
2+
3+
- fix: no longer fail in autocapture.
4+
15
## 4.9.0 - 2025-06-13
26

37
- feat(ai): track reasoning and cache tokens in the LangChain callback

posthog/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ def capture_exception(
708708
)
709709

710710
# Mark the exception as captured to prevent duplicate captures
711-
if exception is not None:
711+
if exception is not None and isinstance(exception, BaseException):
712712
setattr(exception, "__posthog_exception_captured", True)
713713

714714
return res

posthog/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = "4.9.0"
1+
VERSION = "4.10.0"
22

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

0 commit comments

Comments
 (0)