> ## Documentation Index
> Fetch the complete documentation index at: https://warden.buildlab.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Every code Warden returns, what it means, and whether retrying can help.

A refusal is a normal outcome, not a crash. Every code belongs to a class that fixes its HTTP status, and carries an agent-safe message; operator detail — schema names, driver text, host addresses — stays in the audit log and never reaches a response body.

| Class | HTTP | Meaning |
| - | - | - |
| denied | 403 | Not permitted |
| invalid | 400 | The request was wrong |
| pending | 409 | A human refused it, or nobody answered |
| conflict | 409 | State changed under the operation |
| unavailable | 503 | Something downstream is not available now |
| internal | 500 | A bug |

## Identity and access

| Code | Retryable | Meaning |
| - | - | - |
| `unauthenticated` | no | Authentication failed |
| `agent_unknown` | no | The agent identity is not registered |
| `agent_frozen` | no | A circuit breaker froze this agent; a human must reinstate it |
| `lease_expired` · `lease_revoked` · `lease_not_found` | no | The agent's access lease is gone. A fresh request is normally issued a new one |

## The request itself

| Code | Retryable | Meaning |
| - | - | - |
| `parse_failed` | no | The statement could not be parsed, so it was refused |
| `unparsed_construct` | no | It contains something Warden cannot analyse. Refusing beats guessing |
| `unsupported_verb` | no | Not supported on this engine |
| `malformed_request` | no | Bad shape — an unknown `mode`, a `wait` that is not a number |

## Policy

| Code | Retryable | Meaning |
| - | - | - |
| `policy_denied` | no | Policy refused it |
| `resource_not_allowed` | no | The operation touches a resource this agent may not |
| `hazard_denied` | no | It contains a construct policy forbids |
| `unbounded_operation` | no | No bounding predicate, so the record count is unbounded |
| `scope_unenforceable` | no | Warden could not provably restrict it to the agent's scope, so it refused |
| `row_limit_exceeded` · `cost_limit_exceeded` | no | Over a configured limit |
| `capability_unmet` | no | The engine cannot provide a guarantee this policy requires |
| `engine_unknown` | no | No connector for this engine |

## Human gating

| Code | Retryable | Meaning |
| - | - | - |
| `approval_required` | no | It needs a human before it can run |
| `approval_expired` | **yes** | Nobody responded in time. **It did not run** |
| `approval_rejected` | no | A person rejected it |
| `debug_timeout` | **yes** | Expired waiting for a decision in Debug Mode. It did not run |
| `debug_rejected` | no | Rejected in Debug Mode |
| `session_stopped` | **yes** | The debug session ended while it waited. It did not run |
| `operation_unknown` | no | No proposal with this ID for this agent — wrong ID, aged out, or the gateway restarted |

## Consistency

| Code | Retryable | Meaning |
| - | - | - |
| `fence_stale` | **yes** | The data changed after review. It was not applied and needs fresh review |
| `idempotency_missing` | no | Policy requires a key for this class of operation |
| `idempotency_conflict` | no | This key was already used for different work. Your key derivation is wrong |
| `outcome_unknown` | no | The gateway restarted while this key was in flight. Check the data, then retry with a **new** key |

## Execution and infrastructure

| Code | Retryable | Meaning |
| - | - | - |
| `statement_timeout` | **yes** | It exceeded its time limit and was cancelled |
| `pool_exhausted` | **yes** | No connection was free for this agent within the wait limit |
| `execution_failed` | no | The database rejected the statement |
| `masking_failed` | no | The result could not be safely returned, so **the whole result was discarded** |
| `store_unavailable` · `connector_unavailable` · `control_plane_unreachable` | **yes** | A dependency is unavailable |
| `internal` | no | A bug. Please report it |

> [!NOTE]
>
> **Retryable means the operation did not take effect**, not "try again immediately". `approval_expired` and `session_stopped` are retryable because nothing ran. `outcome_unknown` is not, because something may have — which is exactly why it needs a person to look.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.