Skip to content

feat: RFC 7807 problem-details taxonomy with stable error codes (#267) - #299

Merged
BigDella merged 1 commit into
Parcel-Protocol:mainfrom
Alfredzee:feat/problem-details-taxonomy
Oct 19, 2026
Merged

BigDella merged 1 commit into
Parcel-Protocol:mainfrom
Alfredzee:feat/problem-details-taxonomy

Conversation

@Alfredzee

Copy link
Copy Markdown
  • 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 -l
  • This pull request changes at least 20 meaningful files (the scaffold normally creates 23)
  • Every product change is inside the feature directory above
  • This work does not require another open issue or unmerged pull request
  • No generated registry file or shared navigation/route list was edited

How to Test

Describe the exact happy path, one validation failure, one transport failure,
and the network(s) a reviewer should use.

  1. Go to ...
  2. Enter ...
  3. See ...

Evidence

Add screenshots for idle, loading, success and error states. Include the result
of the slice-specific contract check:

npm run verify:features -- <slug>

Checklist

  • npm run check passes locally
  • Logic returns Result<T, Code> for every expected failure
  • Every error code has actionable copy in copy.ts
  • Idle, loading, success and error states are implemented
  • Network requests are tested through MSW, not internal-module mocks
  • Accessibility tests cover at least two states with zero WCAG 2.1 A/AA violations
  • Amount arithmetic uses strings/BigInt, never floating point
  • No secret key is accepted, rendered, stored, logged or transmitted
  • README.md records the feature's non-obvious technical decision
  • If this changes docs/FEATURE_CONTRACT.md, it adds or supersedes an ADR in docs/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

…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.
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@BigDella
BigDella merged commit 502ea3a into Parcel-Protocol:main Oct 19, 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.

Utix: Add API problem-details taxonomy with stable error codes and remediation hints

2 participants