Skip to content

fix: always issue Receipt when Picsum photo fetch fails - #876

Open
crazywriter1 wants to merge 1 commit into
tempoxyz:mainfrom
crazywriter1:fix/photo-receipt-on-upstream-failure
Open

fix: always issue Receipt when Picsum photo fetch fails#876
crazywriter1 wants to merge 1 commit into
tempoxyz:mainfrom
crazywriter1:fix/photo-receipt-on-upstream-failure

Conversation

@crazywriter1

Copy link
Copy Markdown

Summary

  • Paid photo demos (/api/photo, sessions, payment-link) no longer return 502 without a Receipt when Picsum fails after a successful charge/session
  • Shared resolvePicsumPhotoUrl falls back to a canned URL + warning (same pattern as demo/image)
  • Adds unit tests for the helper and /api/photo Receipt path

Test plan

  • pnpm exec vitest run src/picsum-photo.test.ts src/photo.route.test.ts
  • pnpm check
  • Confirm unpaid /api/photo still returns 402 when the local Vite server is reachable

Paid photo demos were returning 502 after a successful charge/session without withReceipt. Fall back to a canned URL so the client still gets a Receipt.
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

@crazywriter1 is attempting to deploy a commit to the Tempo Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the docs label Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant