API routes return inconsistent error JSON shapes.
Affected files
src/app/api/**/route.ts
src/lib/api-response.ts
Tasks
- Use
api-response helpers for all error paths.
- Standardize
{ error: { code, message } } (or documented contract).
- Update client fetch code to parse the unified shape.
Acceptance criteria
Suggested labels
cleanup, api, refactor
Notes
Standalone cleanup issue from CLEANUP_ISSUES_2026-05.md. Complements the audit queue and product backlog.
API routes return inconsistent error JSON shapes.
Affected files
src/app/api/**/route.tssrc/lib/api-response.tsTasks
api-responsehelpers for all error paths.{ error: { code, message } }(or documented contract).Acceptance criteria
Suggested labels
cleanup,api,refactorNotes
Standalone cleanup issue from CLEANUP_ISSUES_2026-05.md. Complements the audit queue and product backlog.