fix(core): preserve HTTP error details - #641
Open
burak33bb wants to merge 2 commits into
Open
Conversation
burak33bb
marked this pull request as ready for review
August 15, 2026 08:34
burak33bb
force-pushed
the
codex/core-http-error-details
branch
from
August 17, 2026 00:58
a6287aa to
7906db2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primary change type
Problem and motivation
Core
HttpClientfailures currently throw a plainError, so callers lose the parsed response body, status text, and headers. That makes typed recovery from HTTP failures harder than it needs to be.Summary and scope
Keep the existing error message, but attach structured HTTP details to the thrown error. The change is limited to the core client failure path and its existing test coverage.
Related work
Related issue or discussion: N/A — direct PR for a small core client bug. I checked recent related PRs; #598 and #625/#626/#627 cover different 402/header issues.
Validation
Tests and documentation
Kept the structured error test for a 402 response. Documentation is N/A because this does not add a package-root export or new public API.
Compatibility and release impact
.changeset/preserve-http-error-details.mdfor@sapiom/core.Security
will follow the
Security Policy for
private reporting.
AI assistance
Used Codex to inspect the client path, make the small code/test update, rebase the branch, and run validation.
Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.any N/A checks above.