Skip to content

fix(core): add HTTP facilitator transport context#2003

Open
Bortlesboat wants to merge 1 commit intox402-foundation:mainfrom
Bortlesboat:codex/x402-error-messages-959
Open

fix(core): add HTTP facilitator transport context#2003
Bortlesboat wants to merge 1 commit intox402-foundation:mainfrom
Bortlesboat:codex/x402-error-messages-959

Conversation

@Bortlesboat
Copy link
Copy Markdown
Contributor

Summary

  • wrap HTTP facilitator transport calls with operation-specific context for verify, settle, and supported
  • preserve the original thrown error detail when auth header setup fails before any request is sent
  • add regression coverage for fetch rejections and auth-header setup failures in the core HTTP client tests

Notes

Issue #959 already has a Go-oriented facilitator improvement linked in the thread. This PR covers the remaining TypeScript HTTP client failure modes where requests fail before a response body exists.

Testing

  • pnpm --dir "C:/Users/andre/.config/superpowers/worktrees/x402/codex-x402-error-messages-959/typescript" --filter @x402/core test -- test/unit/http/httpFacilitatorClient.test.ts
  • pnpm --dir "C:/Users/andre/.config/superpowers/worktrees/x402/codex-x402-error-messages-959/typescript/packages/core" exec eslint src/http/httpFacilitatorClient.ts test/unit/http/httpFacilitatorClient.test.ts
  • pnpm --dir "C:/Users/andre/.config/superpowers/worktrees/x402/codex-x402-error-messages-959/typescript/packages/core" exec prettier --check src/http/httpFacilitatorClient.ts test/unit/http/httpFacilitatorClient.test.ts

Closes #959

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

@Bortlesboat is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added typescript sdk Changes to core v2 packages labels Apr 11, 2026
@Bortlesboat Bortlesboat marked this pull request as ready for review April 12, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk Changes to core v2 packages typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hard to understand what went wrong when something fails

1 participant