Repository navigation
feat: RFC 7807 problem-details taxonomy with stable error codes (#267) - #299
Merged
BigDella merged 1 commit intoOct 19, 2026
Merged
Conversation
…el-Protocol#267) - Add core/errors/problem-details.ts with ProblemDetails type, 39-code PROBLEM_CODES registry (validation, Stellar account/asset/trustline/ transaction, Soroban, Horizon transport, RPC transport, internal), getProblemDefinition(), isProblemRetryable(), problemDetailsFromCode(), horizonToProblemDetails(), rpcToProblemDetails() - Add core/rpc/errors.ts with RpcErrorClassification, classifyRpcError() (maps JSON-RPC standard codes to stable ProblemCode), and classifyRpcTransportError() (maps network/abort/timeout errors) - Add core/errors/__tests__/problem-details.contract.test.ts with 36 contract drift tests covering shape validation, registry stability, exhaustive code count, bridge adapters, and safe-message invariants - Add docs/PROBLEM_DETAILS.md with wire shape, code tables, usage examples, edge cases, failure modes, and rollback/recovery steps Stability contract: codes are permanent (never rename/remove, only add). Safe-message invariants: no user input or raw transport errors are forwarded to the ProblemDetails envelope.
|
@Alfredzee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Add core/errors/problem-details.ts with ProblemDetails type, 39-code PROBLEM_CODES registry (validation, Stellar account/asset/trustline/ transaction, Soroban, Horizon transport, RPC transport, internal), getProblemDefinition(), isProblemRetryable(), problemDetailsFromCode(), horizonToProblemDetails(), rpcToProblemDetails()
Add core/rpc/errors.ts with RpcErrorClassification, classifyRpcError() (maps JSON-RPC standard codes to stable ProblemCode), and classifyRpcTransportError() (maps network/abort/timeout errors)
Add core/errors/tests/problem-details.contract.test.ts with 36 contract drift tests covering shape validation, registry stability, exhaustive code count, bridge adapters, and safe-message invariants
Add docs/PROBLEM_DETAILS.md with wire shape, code tables, usage examples, edge cases, failure modes, and rollback/recovery steps
Stability contract: codes are permanent (never rename/remove, only add). Safe-message invariants: no user input or raw transport errors are forwarded to the ProblemDetails envelope.
Summary
Describe what changed and why. One pull request must implement exactly one
issue and one independent feature slice.
Scope proof
Issue: Closes #
Feature directory:
features/<slug>/Changed file count:
git diff --name-only origin/main...HEAD | wc -lHow to Test
Describe the exact happy path, one validation failure, one transport failure,
and the network(s) a reviewer should use.
Evidence
Add screenshots for idle, loading, success and error states. Include the result
of the slice-specific contract check:
Checklist
npm run checkpasses locallyResult<T, Code>for every expected failurecopy.tsBigInt, never floating pointREADME.mdrecords the feature's non-obvious technical decisiondocs/FEATURE_CONTRACT.md, it adds or supersedes an ADR indocs/adr/Follow-Up
Call out known limitations only. Do not make this pull request depend on future
work; anything required by the acceptance criteria belongs in this slice.
closes #227