Error codes
This page is the long-tail dictionary: every SHROUD_* code the gateway can emit, its HTTP status mapping, and a one-line description. The table is auto-generated from pkg/errcode/codes.go on every release — do not edit it by hand.
For the envelope shape (where these codes appear in the JSON response), the per-transport notes (HTTP / MCP / JSON-RPC / Cocoon WebSocket), Retry-After semantics, and request_id correlation, see Error reference. For caller-side action mapping (when to retry, when to surface, when to alert), see Production guide — Error handling map.
Code | HTTP | Description |
|---|---|---|
| 400 | Batch exceeded maximum allowed inner calls. |
| 410 | Confirmation token expired, already used, or did not match the resubmitted arguments. |
| 202 | Write tool first call: client must resubmit with the issued confirmation_token. |
| 409 | Request conflicts with current resource state. |
| 429 | Workspace credit-unit limit exceeded for the current window. |
| 422 | Idempotency-Key reused with a different request payload. |
| 500 | An unexpected server error occurred. |
| 400 | Idempotency-Key header is invalid for this endpoint or session. |
| 400 | Request parameters failed validation. |
| 404 | Requested resource does not exist. |
| 403 | Caller lacks the required capability for this tool. |
| 429 | Per-key request rate exceeded; retry after the indicated interval. |
| 400 | Tool inputs failed JSON-Schema validation against the registered InputSchema. |
| 503 | Upstream dependency briefly unavailable; retry after the indicated interval. |
| 500 | Tool implementation returned an error. |
| 404 | No tool registered under the requested name. |
| 401 | Authentication credentials missing, malformed, or rejected. |
| 400 | shroud_batch refused: at least one inner call targets a write tool. |
Related
Error reference — envelope shape, HTTP status table, transport-specific notes,
Retry-Afterandrequest_idguidance.Production guide — Error handling map — caller-side action map for every code.
Authentication —
SHROUD_UNAUTHORIZEDtriggers and theBearerheader contract.Billing —
SHROUD_CU_LIMIT_EXCEEDEDand the per-window scope distinction.