Repository navigation
T-2221 Report a server 5xx after the retries run out, like a connection error - #56
Merged
Merged
Conversation
…un out Since 0.5.1 a real 5xx response after all retries drops the batch without any output, while a connection error prints why it gave up. These tests pin "Failed to send logs to Better Stack after 3 retries: HTTP <status>" for 500 and 503, the exact network-error message, and silence when a retry succeeds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the retries run out on a 5xx answer, print "Failed to send logs to Better Stack after 3 retries: HTTP <status>", next to the existing "...: <exception>" for connection errors, instead of dropping the batch without any output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Since 0.5.1 (#41) the flush worker no longer crashes when Better Stack answers a batch with HTTP 500 after all retries, but it now drops that batch without a word. Before #41 the crash at least left a traceback, and a connection error still prints
Failed to send logs to Better Stack after 3 retries: <exception>. Any other 5xx (502, 503, 504) was always silent.This reports every retry loop that runs out the same way:
Failed to send logs to Better Stack after 3 retries: <exception>for connection errors, unchangedFailed to send logs to Better Stack after 3 retries: HTTP <status>for a 5xx answer from the server, newA 5xx that recovers on a retry stays quiet, as before.
The first commit adds the tests and is expected to fail CI (the two server-response tests see no output). The second commit is the fix.
🤖 Generated with Claude Code