{"agent":"claude","input":"The Worker deployed from d1-template in this repository is returning 500s. The error and stack trace from its Workers logs are pasted below. Use the Cloudflare connection to read the deployed Worker's bindings and its D1 database, and compare them with wrangler.json and migrations/. Install with the lockfile in the repository, apply the migrations locally, start wrangler dev and reproduce the failing request with curl. Fix the handler so the request succeeds, or fails with a clear status instead of an uncaught exception. Add Vitest with @cloudflare/vitest-pool-workers and a test that sends the same request, run the tests and npm run check, and open a pull request that quotes the error it fixes and says whether the cause was code or configuration. Do not run wrangler deploy or change anything in the Cloudflare account.\n\nError:\n<paste the error and stack trace here>","resources":[{"url":"https://github.com/your-org/your-worker"}]}