Skip to content

chore: (A-832) fix defaultFetch double consuming response on JSON parse failure#22194

Merged
PhilWindle merged 1 commit into
merge-train/spartanfrom
danielntmd/fix-error-json-parse-consumption
Apr 1, 2026
Merged

chore: (A-832) fix defaultFetch double consuming response on JSON parse failure#22194
PhilWindle merged 1 commit into
merge-train/spartanfrom
danielntmd/fix-error-json-parse-consumption

Conversation

@danielntmd

Copy link
Copy Markdown
Contributor

When the json() call fails and the response was OK (2xx), the code called resp.tex() to include the body in the error. The error message never contains the actual body content since we have already consumed the response body. Now we read the body as text first, then parse as JSON.

When the json() call fails and the response was OK (2xx), the code called resp.tex() to include the body in the error. The error message never contains the actual body content since we have already consumed the response body. Now we read the body as text first, then parse as JSON.
@danielntmd danielntmd changed the title chore: fix defaultFetch double consuming response on JSON parse failure chore: (A-832) fix defaultFetch double consuming response on JSON parse failure Mar 31, 2026
@PhilWindle PhilWindle merged commit d27e06b into merge-train/spartan Apr 1, 2026
14 checks passed
@PhilWindle PhilWindle deleted the danielntmd/fix-error-json-parse-consumption branch April 1, 2026 08:04
github-merge-queue Bot pushed a commit that referenced this pull request Apr 1, 2026
BEGIN_COMMIT_OVERRIDE
chore: (A-771) remove dead code, verify keypair (#22167)
fix(aes128): validate PKCS#7 padding in decryptBufferCBC (#22179)
chore: (A-815) fix l1 tx utils fallback id logic (#22187)
fix(archiver): always advance L1-to-L2 messages syncpoint to current L1
block (#22154)
chore: (A-832) fix defaultFetch double consuming response on JSON parse
failure (#22194)
fix: indefinite retry for prover node and agent broker communication
(#22202)
fix: remove unused createDispatchFn with no method allowlist (#22219)
chore: fix wallet setup to use NO_FROM instead of ZERO address (#22222)
fix: update aes128 bad-key test for PKCS#7 padding validation (#22190)
END_COMMIT_OVERRIDE
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.

2 participants