Non-existent volume returns 502 instead of 404 — error handler mismatch #26
Labels
No labels
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-fetch
blocked:lint-failed
blocked:needs-decision
blocked:no-changes
blocked:no-procedure
blocked:verify-failed
bug
feature-request
in-progress
needs-decompose
needs-triage
ops-task
quickfix
security/high
security/low
security/medium
test-coverage
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/docker_backup#26
Loading…
Add table
Add a link
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?
Bug
Querying a non-existent Docker volume returns HTTP 502 with "Failed to inspect Docker volume" instead of 404 with "Volume not found".
Evidence
Expected:
Root Cause
The
isNotFoundErrorcheck involumes.ts(line 26-33) looks forstatusCode === 404on the error object, but Dockerode's error shape doesn't match this pattern. The check never passes, so all volume errors fall through to the 502 catch-all.This affects 4 endpoints:
GET /volumes/:id(line 51)GET /volumes/:id/backups(line 75)POST /volumes/:id/restore(line 121)POST /volumes/:id/backup(line 159)Severity
YELLOW Medium — Bad HTTP semantics. API consumers can't distinguish "volume not found" (retry with different ID) from "server broke" (retry later).
Closed by pipeline sweep — no code changes required (blocked:no-changes). Fixer now auto-closes this case going forward.