Jersey checkout "load failed" error on payment click #340

Closed
opened 2026-04-04 22:55:21 +00:00 by forgejo_admin · 1 comment

Type

Bug

Lineage

Standalone — discovered via user email report during operations (2026-04-04).

Repo

forgejo_admin/basketball-api (backend) and forgejo_admin/westside-app (frontend)

What Broke

When a parent clicks "Order" on the jersey page (accessed via email token link), the browser shows "load failed" instead of redirecting to Stripe checkout. The fetch() call to POST /jersey/checkout?token=... fails at the network level — never reaches the server. GET endpoints on the same API (/jersey/options, /jersey/sizes) respond correctly.

Reporter: Daniel Niyitanga (niyitangadaniel72@gmail.com), 2026-04-04 16:45 MT.

"Load failed" is Safari/iOS's TypeError.message for network-level fetch failures.

Repro Steps

  1. Open jersey link from email: https://westsidekingsandqueens.tail5b443a.ts.net/jersey?token=15nB1jKs0FmwSbG0qI5lYPspbEAYAag9djFB262horw
  2. Select a jersey option (e.g. Reversible), pick a size and number
  3. Click "Order — $90"
  4. Observe: "load failed" error displayed, no redirect to Stripe

Expected Behavior

Clicking "Order" should POST to /jersey/checkout?token=..., receive a Stripe checkout URL, and redirect the user to Stripe's hosted payment page.

Environment

  • Cluster/namespace: prod / westside
  • Service: basketball-api (deployed version unknown — check running image)
  • Frontend: westside-app at westsidekingsandqueens.tail5b443a.ts.net
  • API confirmed reachable: GET /jersey/options returns 200

Acceptance Criteria

  • Root cause identified (CORS preflight on POST, Stripe key, or deployment issue)
  • POST /jersey/checkout?token=... returns valid Stripe checkout URL
  • Daniel can complete jersey purchase via his email link
  • Verified on Safari/iOS
  • westside-basketball — project this affects
  • Key files: basketball-api/src/basketball_api/routes/jersey.py:172-338, basketball-api/src/basketball_api/main.py (CORS), westside-app/src/routes/(app)/jersey/+page.svelte:248-289
  • Investigate priority: (1) CORS preflight on POST, (2) Stripe API key in deployed env, (3) stale deployment (opt_out option missing from API response)
### Type Bug ### Lineage Standalone — discovered via user email report during operations (2026-04-04). ### Repo `forgejo_admin/basketball-api` (backend) and `forgejo_admin/westside-app` (frontend) ### What Broke When a parent clicks "Order" on the jersey page (accessed via email token link), the browser shows **"load failed"** instead of redirecting to Stripe checkout. The `fetch()` call to `POST /jersey/checkout?token=...` fails at the network level — never reaches the server. GET endpoints on the same API (`/jersey/options`, `/jersey/sizes`) respond correctly. Reporter: Daniel Niyitanga (niyitangadaniel72@gmail.com), 2026-04-04 16:45 MT. "Load failed" is Safari/iOS's `TypeError.message` for network-level fetch failures. ### Repro Steps 1. Open jersey link from email: `https://westsidekingsandqueens.tail5b443a.ts.net/jersey?token=15nB1jKs0FmwSbG0qI5lYPspbEAYAag9djFB262horw` 2. Select a jersey option (e.g. Reversible), pick a size and number 3. Click "Order — $90" 4. Observe: "load failed" error displayed, no redirect to Stripe ### Expected Behavior Clicking "Order" should POST to `/jersey/checkout?token=...`, receive a Stripe checkout URL, and redirect the user to Stripe's hosted payment page. ### Environment - Cluster/namespace: prod / westside - Service: basketball-api (deployed version unknown — check running image) - Frontend: westside-app at `westsidekingsandqueens.tail5b443a.ts.net` - API confirmed reachable: `GET /jersey/options` returns 200 ### Acceptance Criteria - [ ] Root cause identified (CORS preflight on POST, Stripe key, or deployment issue) - [ ] `POST /jersey/checkout?token=...` returns valid Stripe checkout URL - [ ] Daniel can complete jersey purchase via his email link - [ ] Verified on Safari/iOS ### Related - `westside-basketball` — project this affects - Key files: `basketball-api/src/basketball_api/routes/jersey.py:172-338`, `basketball-api/src/basketball_api/main.py` (CORS), `westside-app/src/routes/(app)/jersey/+page.svelte:248-289` - Investigate priority: (1) CORS preflight on POST, (2) Stripe API key in deployed env, (3) stale deployment (`opt_out` option missing from API response)
Author
Owner

Scope Review: READY

Review note: review-823-2026-04-04
Well-scoped bug ticket with verified file targets, complete template, and clear investigation priority. All 4 AC are testable. No hard blockers from related QA/in_progress items (#718, #719, #733). Single agent pass, <5 min estimated.

Non-blocking discovered scope:

  • [SCOPE] arch-basketball-api architecture note does not exist in pal-e-docs (platform-wide gap)
## Scope Review: READY Review note: `review-823-2026-04-04` Well-scoped bug ticket with verified file targets, complete template, and clear investigation priority. All 4 AC are testable. No hard blockers from related QA/in_progress items (#718, #719, #733). Single agent pass, <5 min estimated. Non-blocking discovered scope: - `[SCOPE]` arch-basketball-api architecture note does not exist in pal-e-docs (platform-wide gap)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/basketball-api#340
No description provided.