Files
dashcaddy/dashcaddy-api
Hermes 5e5b572199
CI / Test & Lint (push) Canceled after 0s
CI / Security audit (push) Canceled after 0s
[grade=B] DC-086: Structured error code system (framework + 80 codes)
New error-codes.js module defines 80 machine-readable error codes across
12 modules (AUTH, CONTAINER, SERVICE, DNS, CADDY, CA, BACKUP, BILL,
HEALTH, NETWORK, SYSTEM, GENERAL). Format: DC-[MODULE]-[NUMBER].

errorResponse() now surfaces extras.code at top level of JSON body for
client-side handling. Existing callers work unchanged — codes are opt-in.

Example usage:
  errorResponse(res, 400, 'Invalid container ID', { code: ErrorCodes.CONTAINER.INVALID_ID })

1560 tests pass. Routes will adopt codes incrementally.
2026-08-12 12:17:17 -07:00
..
2026-03-05 02:26:12 -08:00
2026-07-24 05:14:56 -07:00