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 @@
# 7.5.1 - 2026-01-07

fix: avoid return from finally block to fix Python 3.14 SyntaxWarning (#361)[https://github.com/PostHog/posthog-python/pull/361] - thanks @jodal

# 7.5.0 - 2026-01-06

feat: Capture Langchain, OpenAI and Anthropic errors as exceptions (if exception autocapture is enabled)
Expand Down
8 changes: 6 additions & 2 deletions posthog/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ def upload(self):
self.log.error("error uploading: %s", e)
success = False
if self.on_error:
self.on_error(e, batch)
try:
self.on_error(e, batch)
except Exception as e:
self.log.error("on_error handler failed: %s", e)
finally:
# mark items as acknowledged from queue
for item in batch:
self.queue.task_done()
return success

return success

def next(self):
"""Return the next batch of items to upload."""
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 = "7.5.0"
VERSION = "7.5.1"

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