{"agent":"claude","input":"A Sentry issue for this Next.js repository is attached below. Read its latest event through the Sentry connection: the exception, the transaction, the breadcrumbs, the release and environment tags and the in-app frames. Find the route handler, server action or middleware the frames name, starting with app/api/stripe/checkout/route.ts, app/api/stripe/webhook/route.ts, lib/payments/stripe.ts, app/(login)/actions.ts and middleware.ts. This repository has no test runner: add vitest with a minimal vitest.config.ts and write one test that calls the handler or action with the input the breadcrumbs describe, stubbing stripe, getUser and db, and confirm it fails with the same message. Fix the cause rather than catching the exception, run npx vitest run and pnpm build, and open a pull request that links the Sentry issue, quotes the frames and the failing test output and explains the cause. Stop at needs_review if you cannot reproduce it.\n\nSentry issue:\n{issue}","connections":["sentry"],"resources":[{"url":"https://github.com/your-org/your-app"}]}