Skip to content

refactor(audience-sdk): drop response-body cap on OnError messages#713

Merged
ImmutableJeffrey merged 1 commit intofeat/audience-sample-appfrom
refactor/audience-sdk-drop-error-body-cap
Apr 28, 2026
Merged

refactor(audience-sdk): drop response-body cap on OnError messages#713
ImmutableJeffrey merged 1 commit intofeat/audience-sample-appfrom
refactor/audience-sdk-drop-error-body-cap

Conversation

@ImmutableJeffrey
Copy link
Copy Markdown
Collaborator

@ImmutableJeffrey ImmutableJeffrey commented Apr 28, 2026

Summary

Removes the 500-char MaxErrorBodyChars cap and the trim ternary inside ReadBodyForErrorAsync in HttpTransport. The cap was defensive against verbose backend responses (stack traces, HTML error pages) but the audience backend returns short structured JSON for both 4xx and 5xx, making the cap dead code. Consumers now see the full response body verbatim in OnError messages.

Stacked on top of #711. Base = feat/audience-sample-app. Once 711 merges, this PR's base will auto-rebase to main.

Linear: SDK-152

Removes MaxErrorBodyChars (500) and the trim ternary inside
ReadBodyForErrorAsync. The cap was defensive against verbose backend
responses (stack traces, HTML error pages) but the audience backend
returns short structured JSON for both 4xx and 5xx, making the cap
dead code. Consumers now see the full response body verbatim.
@ImmutableJeffrey ImmutableJeffrey merged commit 799fa9b into feat/audience-sample-app Apr 28, 2026
18 checks passed
@ImmutableJeffrey ImmutableJeffrey deleted the refactor/audience-sdk-drop-error-body-cap branch April 28, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants