Skip to content

feat: report delivery failures through OnError - #32

Merged
samber merged 4 commits into
mainfrom
feat/report-delivery-errors
Oct 13, 2026
Merged

samber merged 4 commits into
mainfrom
feat/report-delivery-errors

Conversation

@samber

@samber samber commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Delivery errors and non-2xx responses were silently discarded: a rejected token or a server error produced no output at all.

  • add an OnError func(error) option
  • call it for marshaling failures, network errors and non-2xx responses (status code plus the first 512 bytes of the body)
  • default: errors are ignored (nothing is written to stderr)

Delivery errors and non-2xx responses were silently discarded, so a
rejected token or a server error produced no output at all.

Add an OnError option, called for marshaling failures, network errors
and non-2xx responses. It defaults to one line on stderr.
@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.90%. Comparing base (f4a7a4e) to head (27c3b39).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##            main      #32       +/-   ##
==========================================
+ Coverage   0.00%   75.90%   +75.90%     
==========================================
  Files          2        2               
  Lines         76       83        +7     
==========================================
+ Hits           0       63       +63     
+ Misses        76       16       -60     
- Partials       0        4        +4     
Flag Coverage Δ
unittests 75.90% <100.00%> (+75.90%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samber
samber marked this pull request as ready for review October 13, 2026 15:47
A logging library must not write to stderr unasked. Delivery failures
stay observable by setting OnError.
@samber
samber merged commit 1c1f4b2 into main Oct 13, 2026
14 checks passed
@samber
samber deleted the feat/report-delivery-errors branch October 13, 2026 15:57
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