Error Glossary
Every error response from Cadreen follows the same structure. Parse the error.code, not the error.message. Codes are stable; messages may change phrasing.
Canonical error shape
{
"error": {
"type": "permission_error",
"code": "blocked_by_policy",
"message": "Action blocked by governance policy",
"hint": "Resolve the escalation or adjust governance rules",
"doc_url": "https://accomplishanything.today/infra/docs/errors#err-blocked_by_policy",
"next_action": {
"type": "resolve_escalation",
"label": "Resolve the policy block"
}
}
}Every error response includes a trace_id. Use it to inspect the full context in the dashboard trace explorer.
Outcome vs. Error
Not every non-200 response is an error. Some 2xx responses carry a structured status:
| HTTP | Status field | Meaning |
|---|---|---|
| 200 | answered | Intent resolved immediately. Read message.content. |
| 200 | needs_input | More information required. Read clarification.questions. |
| 200 | ready_to_execute | Plan is ready. Trigger execution to proceed. |
| 200 | executing | Mission is running. Stream or poll for progress. |
| 200 | blocked_by_policy | Governance prevented the action. Read next_action for resolution path. |
| 200 | failed | Execution failed. Use the trace ID to diagnose via GET /api/v1/cadreen/intelligence/{id}. |
Branch on status or type, never on the HTTP status alone. The X-Cadreen-Gate header mirrors the gate: ok, blocked, escalate, needs_input.
Error catalog
Every error code Cadreen returns. The hint field on each error response tells you how to fix it. Bookmark this page — it is the canonical error reference.
| HTTP | Code | Hint |
|---|---|---|
| 400 | invalid_request | Check request syntax. Ensure the body is valid JSON and all required fields are present. |
| 400 | missing_fields | Include at least one of: connections, credentials, memory, or policies. |
| 400 | invalid_memory_type | Valid types are: reference, preference, episode, precedent, note, project. |
| 400 | invalid_memory_id | Memory IDs are UUIDs — check that the ID is well-formed and exists. |
| 400 | memory_query_required | Provide a `query` parameter to search memory. |
| 400 | openapi_invalid_url | The OpenAPI spec URL must be a valid HTTPS URL. |
| 400 | assessment_missing_task | Provide a `task` describing what you want to accomplish. |
| 400 | policy_missing_name | Policies require a `name` field. |
| 400 | escalation_missing_decision | Provide a `decision` field with one of: auto, auto_complete, handoff, escalate, clarify_requester, abstain. |
| 401 | unauthorized | Include an `Authorization: Bearer <api_key>` header with a valid API key. |
| 404 | not_found | The requested resource or endpoint was not found. Check the URL path. |
| 403 | forbidden | Your API key does not have permission for this resource. |
| 403 | connection_forbidden | This connection belongs to a different workspace or requires elevated permissions. |
| 403 | blocked_by_policy | This action was blocked by a rule. Check the response for what to do next. |
| 403 | conditional_approval_required | Human approval needed. Follow the approve URL in the response. |
| 404 | memory_not_found | The requested memory item was not found — verify the ID or create it first. |
| 404 | connection_not_found | Verify the connection ID or capability name. List connections with GET /connections. |
| 404 | policy_not_found | The requested policy bundle was not found. List policies with GET /policies. |
| 404 | escalation_not_found | The escalation ID was not found. List escalations with GET /escalations. |
| 404 | credential_not_found | The credential ID was not found. List credentials with GET /credentials. |
| 404 | intelligence_not_found | The request record was not found. Check the ID or list records. |
| 404 | webhook_not_found | The webhook subscription was not found. List webhooks with GET /webhooks. |
| 422 | tenant_required | Pass a valid workspace ID header. |
| 422 | missing_capability | Required tool not connected. Connect the missing integration. |
| 422 | degraded_capability | The connected tool isn't working. Check its status and try reconnecting. |
| 429 | rate_limit | Reduce request frequency or request a rate limit increase. See the `Retry-After` header. |
| 503 | store_unavailable | A backend dependency is temporarily unavailable. Retry with exponential backoff. |
| 503 | service_unavailable | A backend dependency is temporarily unavailable. Retry with exponential backoff. |
| 500 | internal_error | Server-side failure. Retry with exponential backoff. Report the trace ID if persistent. |
| 500 | memory_creation_failed | Ensure `content.text` is non-empty and the type is valid. |
| 500 | memory_search_failed | Internal knowledge query failed. Retry with a more specific query. |
| 503 | governance_unavailable | Rules engine is not configured. Contact your workspace admin. |
| 500 | policy_query_failed | Governance policy query failed. Retry or check governance configuration. |
| 500 | policy_creation_failed | Policy creation failed. Check for duplicate names or invalid rules. |
| 500 | policy_confirm_failed | Policy confirmation failed. Verify the policy ID and version are correct. |
| 500 | policy_evaluation_failed | Check that the policy `rule` is a valid natural-language condition. |
| 503 | capabilities_unavailable | No tools are configured for this workspace. |
| 503 | audit_unavailable | Audit log is not configured. Contact your workspace admin. |
| 500 | audit_query_failed | Audit query failed. Check filter parameters and retry. |
| 503 | learning_unavailable | Learning system is not configured. Contact your workspace admin. |
| 503 | escalations_unavailable | Escalation system is not configured. Contact your workspace admin. |
| 503 | credentials_unavailable | Credential store is not configured. Contact your workspace admin. |
| 500 | credential_creation_failed | Ensure `provider`, `name`, and `key_data` are all provided. |
| 500 | diagnosis_failed | Provide at minimum `error_message` and optionally `error_category` and `tool_name`. |
| 503 | intelligence_unavailable | Request tracking is not configured. Contact your workspace admin. |
| 503 | webhook_unavailable | Webhook system is not configured. Contact your workspace admin. |
| 500 | webhook_creation_failed | Provide a valid `url` (HTTPS required), at least one `event`, and a `secret`. |
| 500 | connection_unregister_failed | Connection deletion failed. Verify the ID is valid and the connection exists. |
| 503 | provider_unavailable | Integration provider is not configured. Contact your workspace admin. |
| 503 | openapi_unavailable | OpenAPI integration is not configured. Contact your workspace admin. |
| 503 | mcp_unavailable | MCP gateway is not configured. Contact your workspace admin. |
| 500 | escalation_resolve_failed | Escalation resolution failed. Verify the decision value is valid. |
| 500 | credential_delete_failed | Credential deletion failed. Verify the ID is valid. |
| 500 | webhook_delete_failed | Webhook deletion failed. Verify the ID is valid. |
| 500 | intelligence_query_failed | Intelligence query failed. Check filter parameters and retry. |
| 503 | diagnosis_unavailable | Healing diagnostics are not configured. Contact your workspace admin. |
| 503 | preconditions_unavailable | Precondition checking is not configured. Contact your workspace admin. |
| 500 | install_failed | Integration installation failed. Check the integration ID and try again. |
| 500 | openapi_fetch_failed | Could not fetch the OpenAPI spec from the provided URL. Check it is publicly accessible. |
| 500 | openapi_read_failed | Could not parse the OpenAPI spec. Ensure it is valid JSON or YAML. |
| 500 | openapi_invalid_spec | The OpenAPI spec is syntactically valid but missing required fields (e.g. paths, info). |
| 500 | openapi_generation_failed | Tool generation from the OpenAPI spec failed. Check the spec structure. |
| 500 | mcp_registration_failed | MCP server registration failed. Check the connection URL and protocol. |
| 500 | escalation_list_failed | Escalation listing failed. Retry or contact support. |
| 500 | credential_list_failed | Credential listing failed. Retry or contact support. |
| 500 | webhook_list_failed | Webhook listing failed. Retry or contact support. |
| 500 | intelligence_stats_failed | Intelligence stats aggregation failed. Retry or contact support. |
| 500 | audit_stats_failed | Audit stats aggregation failed. Retry or contact support. |
| 500 | audit_timeline_failed | Execution timeline query failed. Verify the execution ID. |
| 500 | learning_detection_failed | Pattern detection failed. Contact support. |
| 500 | learning_query_failed | Learning query failed. Contact support. |
| 500 | learning_suggestion_failed | Knowledge suggestion failed. Contact support. |
| 500 | preconditions_check_failed | Precondition check failed. Verify tool parameters. |
| 503 | routing_unavailable | Request routing is not configured. Contact your workspace admin. |
| 403 | a2a_external_agents_disabled | Enable external agents in workspace settings before connecting. |
| 502 | a2a_agent_card_fetch_failed | Could not fetch the Agent Card from the provided URL. Check it's publicly accessible. |
| 409 | a2a_connection_already_exists | An external agent connection to this URL already exists. |
| 504 | a2a_task_timeout | The external agent did not respond within the timeout window. |
| 403 | a2a_governance_blocked | A rule blocked this interaction. |
| 400 | a2a_ssrf_blocked | The URL was blocked for security reasons (localhost, private IP, or invalid scheme). |
| 400 | federation_self_federation_blocked | Cannot create a federation link to your own workspace. |
| 404 | federation_target_not_found | The target workspace was not found. Verify the workspace ID. |
| 409 | federation_already_exists | A federation link to this workspace already exists. |
| 500 | federation_link_creation_failed | Federation link creation failed. Check workspace IDs and try again. |
| 403 | federation_approval_denied | You do not have permission to approve this federation link. |
| 500 | federation_suspension_failed | Federation suspension failed. Verify the link ID and status. |
Authentication & rate limit errors
These errors occur when your API key is missing, invalid, or you are sending too many requests.
| HTTP | Code | Hint |
|---|---|---|
| 401 | auth_missing | No Authorization header provided |
| 401 | auth_invalid | Invalid or expired API key |
| 401 | auth_revoked | Key has been revoked |
| 401 | auth_rotating | Old key after rotation — use the new key |
| 403 | auth_forbidden | Key does not have access to this workspace resource |
| 429 | rate_limited | Too many requests — retry after Retry-After header |
Recovery & self-healing
For tool failures and execution errors, Cadreen has a self-healing subsystem that diagnoses root causes and records recoveries:
POST /api/v1/cadreen/healing/diagnose— Diagnose a failure by error message, category, and tool name. Returns root cause, confidence, and recovery strategy.GET /api/v1/cadreen/healing/precedents— Browse past recoveries to find a pattern that matches your failure.
What not to do
Common integration mistakes and how to avoid them.
- 1Do not parse prose to decide what happened. Always branch on
type,status, orgate.reason_code. Message content strings may change phrasing. - 2Do not ignore governance gates. The
X-Cadreen-Gateheader saysblocked— the action did not execute. Do not retry without resolving the gate first. - 3Do not retry blindly. Check the
gateandnext_actionfirst. Retries without resolving the root cause are wasted calls and will hit the same block. - 4Do not store secrets in memory items. Use
POST /api/v1/cadreen/credentialsfor API keys, tokens, and secrets. Memory items are queryable and shareable — credentials are encrypted at rest and never surfaced in traces. - 5Do not treat
intelligence.process.duration_msas SLA. It varies with model latency and system load. UseX-Cadreen-Trace-IDfor observability, not timing contracts. - 6Do not hard-code field paths inside
intelligence. Use thefield_stability.stablelist to know what is safe to depend on. Fields inevolvingmay change. - 7Do not discard the setup response.
POST /api/v1/cadreen/setupreturns your installation checklist: connections to register, memory to upload, policies to confirm, and webhooks to configure. Revisit it as your integration grows.