Repository navigation
fix: shared audit route, Stripe 400, readable errors, hero screenshot on mobile - #5
Conversation
/api/audit/[id] imported a legacy db module that queries a dimension_results table which does not exist, so every request returned 500 and cached report links never loaded. Use getAuditById and return the shape the analyze page expects, without exposing user_id.
Raw text like '400 <model> is not a valid model ID' reached users. Log the real error server-side and map it to a capture-failed, busy, or generic message.
The first capture used a thum.io URL (15s viewport wait) that the browser often failed to load, leaving a broken image in the filmstrip.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
|
The Vercel preview check is red with Generated by Claude Code |
What
Four small fixes found while testing production as a mobile user:
/api/audit/[id]imported a legacy db module that queries adimension_resultstable that does not exist, so every request returned 500 and cached report links (/analyze?id=) never loaded. It now usesgetAuditByIdand returns the shape the analyze page expects (withoutuser_id); unknown ids return 404.POST /api/stripewith an empty/invalid body returned 500; it now returns 400.400 <model> is not a valid model IDwas shown to users. It is logged server-side and mapped to a capture-failed, busy, or generic message.Type
Checklist
npx tsc --noEmitandnpx eslintpass on changed files/api/auditand the Blob upload are untested livenpm run buildnot run here (sandbox lacks Stripe/Resend env vars; see test: add Vitest suite covering AI fallback, rate limiter, audit scoring, admin auth #1)