Skip to content

Preserve endpointFetch response headers - #2848

Open
akalinin-stripe wants to merge 1 commit into
masterfrom
preserve-endpoint-fetch-response-headers
Open

akalinin-stripe wants to merge 1 commit into
masterfrom
preserve-endpoint-fetch-response-headers

Conversation

@akalinin-stripe

Copy link
Copy Markdown
Contributor

Why?

EndpointFetchHttpClient currently replaces response headers with an empty object. This prevents response metadata and retry signals returned by endpointFetch from reaching stripe-node responses and errors.

What?

  • Preserve optional response headers from successful endpointFetch calls.
  • Preserve optional response headers from response-shaped rejections.
  • Keep the existing empty-header behavior when the runtime omits headers.
  • Add coverage for SDK response headers and retry-after on Stripe API errors.

Test Plan

  • tsc -p tsconfig.cjs.json --pretty false
  • mocha test/net/EndpointFetchHttpClient.spec.ts test/ExtensibilityPlatformFunctions.spec.ts
  • Targeted ESLint and Prettier checks for changed files

Changelog

  • Preserves response headers returned by endpointFetch in extensibility runtimes.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@akalinin-stripe
akalinin-stripe requested a review from a team as a code owner September 11, 2026 18:07
@akalinin-stripe
akalinin-stripe requested review from kidus-stripe and removed request for a team September 11, 2026 18:07
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.

1 participant