Opus finding
`request.json()` is not wrapped in try/catch — malformed JSON yields an unhandled 500 instead of 400
- dashboard/app/api/secrets/route.ts:87
- dashboard/app/api/secrets/route.ts:108
If a client posts a non-JSON or empty body, `request.json()` throws and the handler returns an uncaught 500 rather than a proper 400 with a descriptive error. This is a contract gap for an API surface that already validates other inputs.
Recommendation
Wrap the `request.json()` call in try/catch and return `{ error: 'Invalid JSON body' }` with 400.