[M-16] Two incompatible error contracts mixed per endpoint (REST {error,reason} vs ICD {iErrorCode} with HTTP-200 failures) #28
Labels
No labels
architecture
code-quality
correctness
critical
docs
high
low
medium
ops
performance
privacy
security
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
antrapol/CA-MDID-eMudhra#28
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?
Finding
Enrollment returns REST-style errors with 400/503; renewal/revoke return ICD-style
iErrorCodewith HTTP 200 for failures like -101/RN102; RequireJwt puts pseudo-codes "400"/"402" in iErrorCode inside a real 401.Evidence
lib/mdid_ws_web/controllers/cert_management_controller.ex:25-71vs:131-141lib/mdid_ws_web/plugs/require_jwt.ex:40-47Impact
Consumers cannot build one error-handling path; ambiguous success/failure semantics.
Fix
Line numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).Verified fixed on main (
1b6216b): all /api/v1/cert_mgmt errors rendered by ApiError as iErrorCode/sErrorMessage (B4).