TASK22224: harden proxy file routes and expand contracts
This commit is contained in:
@@ -331,3 +331,51 @@ Validation:
|
||||
Follow-ups:
|
||||
|
||||
- Optional parity sweep: apply the same explicit catch-path contract pattern to remaining file routes that still rely on implicit promise-chain errors.
|
||||
|
||||
---
|
||||
|
||||
### CL-009: TASK22224 proxy-route resilience and encoding parity bundle
|
||||
|
||||
date: 2026-03-23
|
||||
author: Cline
|
||||
scope: `pages/api/file/{getbloblistproxy,getrepsblobproxy,getawaitingsubmissionfromblobproxy,createappealcompletemessageproxy_api}.js`, `tests/phase21/file-handler-contract.test.cjs`
|
||||
type: change
|
||||
rationale: Continue larger-slice hardening by aligning proxy handlers with explicit async error handling and safer encoded upstream query forwarding for hash-based downstream calls.
|
||||
impact: Improves proxy reliability and compatibility for encoded query values while preserving existing proxy error contracts and response behavior.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- `getbloblistproxy.js`
|
||||
- converted `.then/.catch` chain to explicit `try/catch`
|
||||
- encoded forwarded `container` and `casefolderID` query values
|
||||
- preserved error contract: `GET_BLOB_LIST_PROXY_FAILED`
|
||||
- `getrepsblobproxy.js`
|
||||
- converted `.then/.catch` chain to explicit `try/catch`
|
||||
- encoded forwarded `container`
|
||||
- preserved error contract: `GET_REPS_BLOB_PROXY_FAILED`
|
||||
- `getawaitingsubmissionfromblobproxy.js`
|
||||
- converted `.then/.catch` chain to explicit `try/catch`
|
||||
- preserved error contract: `GET_AWAITING_SUBMISSION_PROXY_FAILED`
|
||||
- `createappealcompletemessageproxy_api.js`
|
||||
- converted `.then/.catch` chain to explicit `try/catch`
|
||||
- encoded forwarded `container` and `tempcaseref`
|
||||
- preserved error contract: `CREATE_APPEAL_COMPLETE_MESSAGE_PROXY_FAILED`
|
||||
- Phase21 tests expanded for proxy paths:
|
||||
- getbloblistproxy success + dependency failure
|
||||
- getrepsblobproxy success
|
||||
- getawaitingsubmissionfromblobproxy dependency failure
|
||||
- createappealcompletemessageproxy dependency failure
|
||||
|
||||
Validation:
|
||||
|
||||
- `node tests/phase21/file-handler-contract.test.cjs` -> pass (46/46)
|
||||
- `node tests/phase21/api-contract-slice1.test.cjs` -> pass
|
||||
- helper: 4/4
|
||||
- file-handler: 46/46
|
||||
- email-handler: 12/12
|
||||
- endpoint-handler: 149/149
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Optional next big slice: bring remaining proxy/message routes using raw axios promise chains (`createcaseinvolvement_api.js`, `createrepinvolvement_api.js`, `updatecase_api.js`) onto the same async/await + explicit contract pattern.
|
||||
|
||||
Reference in New Issue
Block a user