Skip to content

GH-5237 CloudEvents single-envelope send fails on a rejected response - #5241

Merged
jeremydmiller merged 1 commit into
mainfrom
gh-5237
Oct 27, 2026
Merged

jeremydmiller merged 1 commit into
mainfrom
gh-5237

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Closes #5237

Problem

WolverineHttpTransportClientCloudEvents.SendAsync posted the CloudEvents payload and discarded the response, so a send the receiver rejected (4xx/5xx) counted as delivered:

Fix

SendAsync keeps the response and calls EnsureSuccessStatusCode(), like the other three send methods. Every PostAsync on both clients now disposes its HttpResponseMessage (using var response).

Effects: the inline sender now logs the failure (its existing catch, "Failed to send message …"). The buffered/durable /invoke path reports MarkProcessingFailureAsync, so the envelope is retried.

Tests

rejected_sends_fail_5237, with a stub HttpMessageHandler, run for both clients:

  • a 500 fails SendAsync and SendBatchAsync; a 202 completes
  • a CloudEvents endpoint aimed at /_wolverine/invoke sending to a 500 receiver fails the batch, and it is not marked successful

The CloudEvents rejection tests fail on main and pass with the fix. All of Wolverine.Http.Tests.Transport: 129/129. Pinned wolverine.slnx -c Release -f net9.0 build is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U

WolverineHttpTransportClientCloudEvents.SendAsync discarded the response, so a send the
receiver rejected counted as delivered: an inline send looked successful, and on the
per-envelope /invoke path from GH-5231 a durable outbox deleted an envelope that was never
received. It now calls EnsureSuccessStatusCode() like its three siblings, and every send on
both clients disposes its HttpResponseMessage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
@jeremydmiller
jeremydmiller merged commit 9466b26 into main Oct 27, 2026
0 of 47 checks passed
@jeremydmiller jeremydmiller mentioned this pull request Oct 27, 2026
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.

WolverineHttpTransportClientCloudEvents.SendAsync ignores the response status, so a rejected send counts as delivered

1 participant