api hardening
This commit is contained in:
@@ -1258,3 +1258,47 @@ Validation:
|
||||
Follow-ups:
|
||||
|
||||
- Continue same small-batch consistency pattern for remaining sensitive endpoint handlers only where clear guard/logging drift exists.
|
||||
|
||||
---
|
||||
|
||||
### CL-034: Phase 20 endpoint consistency slice — dns/basic-search guard + logging cleanup
|
||||
|
||||
date: 2026-03-14
|
||||
author: Cline
|
||||
scope: `pages/api/endpoint/{getbasicdnssearch_api,getbasicdnsurlsearch_api,getbasicsearchdetailspaged_api}.js`, `tests/phase20/service-behaviour.test.cjs`, `memory-bank/*`
|
||||
type: change
|
||||
rationale: Deliver a small reversible consistency-only slice by removing noisy logging and standardizing required-input negative-path handling in additional sensitive endpoint handlers.
|
||||
impact: Improves endpoint negative-path consistency and logging hygiene while preserving response signatures/shapes.
|
||||
status: completed
|
||||
|
||||
Summary:
|
||||
|
||||
- Removed noisy `console.log` query logging in `getbasicdnssearch_api`.
|
||||
- Added early 400 handling for missing/empty `searchString` in `getbasicdnsurlsearch_api`.
|
||||
- Added early 400 handling for missing required params (`appealTypeName`, `primaryIdAttribute`, `incidentID`) in `getbasicsearchdetailspaged_api`.
|
||||
- Added focused behavioural test pack:
|
||||
- `tests/phase20/service-behaviour.test.cjs` (5 tests)
|
||||
|
||||
Validation:
|
||||
|
||||
- `node tests/phase6/service-parity.test.cjs` -> pass
|
||||
- `node tests/phase6/service-behaviour.test.cjs` -> pass (8/8)
|
||||
- `node tests/phase7/service-behaviour.test.cjs` -> pass (12/12)
|
||||
- `node tests/phase8/service-behaviour.test.cjs` -> pass (5/5)
|
||||
- `node tests/phase9/service-behaviour.test.cjs` -> pass (5/5)
|
||||
- `node tests/phase10/service-behaviour.test.cjs` -> pass (5/5)
|
||||
- `node tests/phase11/service-behaviour.test.cjs` -> pass (4/4)
|
||||
- `node tests/phase12/service-behaviour.test.cjs` -> pass (4/4)
|
||||
- `node tests/phase13/service-behaviour.test.cjs` -> pass (7/7)
|
||||
- `node tests/phase14/service-behaviour.test.cjs` -> pass (9/9)
|
||||
- `node tests/phase15/service-behaviour.test.cjs` -> pass (5/5)
|
||||
- `node tests/phase16/service-behaviour.test.cjs` -> pass (4/4)
|
||||
- `node tests/phase17/service-behaviour.test.cjs` -> pass (6/6)
|
||||
- `node tests/phase18/service-behaviour.test.cjs` -> pass (8/8)
|
||||
- `node tests/phase19/service-behaviour.test.cjs` -> pass (5/5)
|
||||
- `node tests/phase20/service-behaviour.test.cjs` -> pass (5/5)
|
||||
- `npm run lint` -> warnings only (pre-existing hook dependency warnings)
|
||||
|
||||
Follow-ups:
|
||||
|
||||
- Continue same small-batch consistency pattern for remaining endpoint handlers where required-input/logging drift is clear.
|
||||
|
||||
Reference in New Issue
Block a user