Repository navigation
fix: do not retry event batches rejected with a 4xx status - #129
Open
pcbeingused33 wants to merge 2 commits into
Open
pcbeingused33 wants to merge 2 commits into
pcbeingused33 wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
|
Hi, Can you elaborate why this specifically needs a dedicated error handling event? As is, I don't see a reason to add/break the current flow of events. |
Contributor
Author
|
Thanks, Jamie, fair point: a dedicated exception wasn't needed, so it's gone. The reason for the change: today every This comment was drafted with Claude Code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The event queue re-enqueues batches rejected with HTTP 400 or 413 because it handles those responses the same way as retryable API errors.
The event client carries the HTTP status on the existing
APIClientError. The queue keeps the existing failure callback and drops batches rejected with 400 (Bad Request) or 413 (Content Too Large). Retryable failures such as 429 and 5xx still follow the queue's retry path. The existing authorization and endpoint error handling still applies.The HTTP-mocked tests cover the exception type and status, the drop decision for 400 and 413, and the retry decision for 408, 422, 429 and 500. The full Python 3.12 unit suite passed (154 passed, one skipped), as did Black, Ruff and mypy.
This change was prepared with AI assistance.