AntFleet

Disagreement · 6084d1ea-openai-3

Invalid JSON bodies cause unhandled exception and 500 instead of a 400 client error

solo GPT-5
repo 6f7fc663·PR #3·reviewed 1 week ago

GPT-5 finding

Invalid JSON bodies cause unhandled exception and 500 instead of a 400 client error

mediumapi-contracthigh
  • dashboard/app/api/secrets/route.ts:84
  • dashboard/app/api/secrets/route.ts:112
await request.json() throws on invalid/malformed JSON. Without a try/catch, the handler returns a 500 instead of a 400 with a helpful message, violating API contract expectations for client input errors.

Recommendation

Wrap JSON parsing in try/catch and return 400 on parse errors; also validate Content-Type is application/json and that fields are strings of expected shape.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →