Repository navigation
Production readiness hardening for MotionCode - #2
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 063ffd99b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return NextResponse.json( | ||
| { error: publicErrorMessage(error) }, | ||
| { status: 400 }, |
There was a problem hiding this comment.
Return server errors for provider/quota failures
When the durable quota store is unavailable or Gemini fails, those exceptions flow into this catch and are reported as HTTP 400. In production that makes transient server/provider failures look like malformed client requests, so API callers and monitoring that distinguish 4xx from 5xx will not treat a valid upload as retryable or operationally broken; keep 400 for parse/validation errors and return a 5xx for internal dependency failures.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 4694ab2: /api/analyze now keeps malformed JSON/schema validation at HTTP 400 and returns HTTP 500 for Gemini/quota/internal dependency failures. Added unit coverage for the status classifier and route regressions.
Summary
Verification
npm cinpm run typechecknpm run lintnpm test(48 tests)npm run test:e2e(4 tests)npm run buildnpm audit --omit=dev --audit-level=moderatenpm audit --audit-level=moderateDeployment Notes
GEMINI_API_KEY,UPSTASH_REDIS_REST_URL, andUPSTASH_REDIS_REST_TOKEN.