refactor(actions): adopt endpoint client in reference data service

This commit is contained in:
2026-03-25 06:19:37 +00:00
parent 6fa7cf9375
commit eb3b6013b3
3 changed files with 64 additions and 49 deletions
+28
View File
@@ -1485,3 +1485,31 @@ Addendum (same TASK22260 slice):
- `actions/services/integrationDirectService.js` (POST via `requestJson`)
- `actions/services/adminDirectService.js` (GET flows via `getJson`)
- Updated `actions/clients/README.md` to include `endpointClient` in current extracted clients.
---
### CL-040: TASK22260 next slice — reference-data direct service endpointClient adoption
date: 2026-03-25
author: Cline
scope: `actions/services/referenceDataDirectService.js`, `actions/clients/README.md`
type: change
rationale: Continue the incremental façade/client adoption stream by migrating another bounded direct-service module to shared endpoint request helpers.
impact: Reduces axios boilerplate and centralizes JSON extraction behavior for reference-data requests without changing public call signatures.
status: completed
Summary:
- Migrated `actions/services/referenceDataDirectService.js` from direct `axios.get(...).then(res => res.data)` patterns to shared `getJson(...)` helper from `actions/clients/endpointClient`.
- Preserved existing error behavior:
- `logAndReturnEmptyValueErrorResponse` for appeals/project/LPA fetches
- `consoleLogger` catch handling for form/mandatory/picklist/notice fetches
- Updated `actions/clients/README.md` usage notes to include reference-data service reuse.
Validation:
- `npm run lint` -> warnings only (pre-existing `react-hooks/exhaustive-deps`; no new lint errors)
Follow-ups:
- Next optional bounded slice: adopt `getJson`/`requestJson` for selected low-risk read paths in `searchDirectService` or `caseDirectService` while preserving per-function error semantics.