Skip to content

T-2221 Report a server 5xx after the retries run out, like a connection error - #56

Merged
PetrHeinz merged 2 commits into
masterfrom
claude/t-2221-report-5xx
Oct 19, 2026
Merged

PetrHeinz merged 2 commits into
masterfrom
claude/t-2221-report-5xx

Conversation

@PetrHeinz

Copy link
Copy Markdown
Member

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, unchanged
  • Failed to send logs to Better Stack after 3 retries: HTTP <status> for a 5xx answer from the server, new

A 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

PetrHeinz and others added 2 commits October 19, 2026 12:12
…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>
@PetrHeinz
PetrHeinz marked this pull request as ready for review October 19, 2026 10:29
@PetrHeinz
PetrHeinz merged commit 8e81890 into master Oct 19, 2026
17 checks passed
@PetrHeinz
PetrHeinz deleted the claude/t-2221-report-5xx branch October 19, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant