refactor(occupancy): replace manual 404 checks with domain_errors and clean delete result contract #251
Labels
No labels
blocked
bug
enhancement
high-priority
low-priority
needs-info
needs-triage
ready-for-agent
ready-for-human
referenced
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gabogg/hikcentral#251
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up for PR #177 (next-day settings activation, #114) addressing pass-4 review finding P3-4:
Scope
In
app/controllers/occupancy_controller.py:340-346and:364-370, manual error status checks inspectres.status == "NOT_FOUND"to raiseHTTPException, whileapp/controllers/errors.py:domain_errorsalready mapsLookupErrorto 404 with standard JSON format and headers.Additionally,
"NOT_FOUND"leaks into theScheduleExceptionDeleteResultcontract.Acceptance Criteria
LookupErrorin service methods when entities are not found.with domain_errors():.NOT_FOUNDstatus leakage fromScheduleExceptionDeleteResult.Refs #177, #114.