Bug library · server · flow
500 on pay
The pay endpoint JSON-parses the coupon code, which throws for any real code and returns HTTP 500.
The diff
app/api/pay/route.ts- couponCode: quote.couponCode,+ couponCode: quote.couponCode ? (JSON.parse(str(body.coupon)) as { code: string }).code : null,