TASK22102: slice3 migrate file proxy handlers

This commit is contained in:
2026-03-17 12:58:20 +00:00
parent f16161bcee
commit 3cbd876b77
5 changed files with 80 additions and 12 deletions
+32
View File
@@ -1371,3 +1371,35 @@ Validation:
Follow-ups:
- Next slice can target selected file handlers for equivalent response contract cleanup.
---
### CL-037: TASK22102 API contract consistency — Slice 3 (file proxy handlers)
date: 2026-03-17
author: Cline
scope: `pages/api/file/{getbloblistproxy,getrepsblobproxy,getawaitingsubmissionfromblobproxy,createappealcompletemessageproxy_api}.js`
type: change
rationale: Extend contract consistency into selected proxy file handlers by replacing raw error passthrough and empty 400s with standardized structured responses.
impact: Improves API error contract clarity for selected file proxy routes while preserving success payload pass-through behavior.
status: completed
Summary:
- Migrated selected file proxy handlers to shared response helper usage:
- `getbloblistproxy`
- `getrepsblobproxy`
- `getawaitingsubmissionfromblobproxy`
- `createappealcompletemessageproxy_api`
- Replaced direct `res.status(...).json(...)` handling with:
- `respondSuccess(...)`
- `respondError(...)`
- Added explicit structured 400 responses for missing required query values and proxy fetch failures.
Validation:
- `npx next lint --file pages/api/file/getbloblistproxy.js --file pages/api/file/getrepsblobproxy.js --file pages/api/file/getawaitingsubmissionfromblobproxy.js --file pages/api/file/createappealcompletemessageproxy_api.js` -> pass (no warnings/errors)
Follow-ups:
- Next slice should target non-proxy file handlers that still return raw `error` payloads.