Skip to content

fix: remove the duplicate dispute-charge route from the hosted Stripe test fake - #1429

Merged
nedtwigg merged 1 commit into
mainfrom
fix/issue-1428
Oct 29, 2026
Merged

nedtwigg merged 1 commit into
mainfrom
fix/issue-1428

Conversation

@dormouse-bot

Copy link
Copy Markdown
Collaborator

#1425 and #1426 each added a fake Stripe route for GET /v1/charges/ch_for_<id> to hosted/server/tests/stripe-fake.ts, and merging both kept the two blocks in the same scope, so hosted's tsc --noEmit fails with TS2451: Cannot redeclare block-scoped variable 'charge' and stops pnpm build on main (run 40813938991). This removes the second block and keeps #1426's handler, which calls disputedCharge. Both handlers returned the same charge body and the same 404 for an unknown dispute, and the first one matched every request, so the second was unreachable. Test behavior does not change.

The sandbox could not install dependencies (no registry access), so I couldn't run the typecheck locally. The Build & Test check on this PR is the verification.

Closes #1428 — automated triage

#1425 and #1426 each added a /v1/charges/ch_for_<id> handler, and the
merge kept both, so hosted's tsc fails redeclaring 'charge'. Keep
#1426's handler, which reuses disputedCharge; the two returned the same
body and 404.

Closes #1428
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9a5ad94
Status: ✅  Deploy successful!
Preview URL: https://c15c2a7e.mouseterm.pages.dev
Branch Preview URL: https://fix-issue-1428.mouseterm.pages.dev

View logs

@nedtwigg
nedtwigg merged commit 507fb19 into main Oct 29, 2026
12 checks passed
@nedtwigg
nedtwigg deleted the fix/issue-1428 branch October 29, 2026 04:03
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.

hosted build: stripe-fake.ts declares the charge route twice after #1425 and #1426 merged

2 participants