# isErrorBody

<!-- https://uncage.vercel.app/docs/api/client/functions/iserrorbody/ -->

```ts
function isErrorBody(v): v is { code: "auth_required" | "runtime_unavailable" | "unsupported_capability" | "invalid_workspace" | "session_busy" | "session_read_only" | "not_found" | "unauthorized" | "forbidden_origin" | "invalid_request" | "approval_expired" | "approval_already_resolved" | "event_replay_unavailable" | "runtime_disconnected" | "policy_denied" | "store_locked" | "attachment_too_large" | "attachment_type_unsupported" | "machine_offline" | "machine_not_found" | "upgrade_required" | "tool_failed" | "device_code_expired" | "rate_limited" | "internal_error"; details?: Record<string, unknown>; hint?: string; message: string; requestId?: string; retryable: boolean };
```

Defined in: client/src/guards.ts:10

An `{ error }` body: `code` and `message` strings, a `retryable` boolean, optional `hint`/`details`.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `v` | `unknown` |

## Returns

v is \{ code: "auth\_required" \| "runtime\_unavailable" \| "unsupported\_capability" \| "invalid\_workspace" \| "session\_busy" \| "session\_read\_only" \| "not\_found" \| "unauthorized" \| "forbidden\_origin" \| "invalid\_request" \| "approval\_expired" \| "approval\_already\_resolved" \| "event\_replay\_unavailable" \| "runtime\_disconnected" \| "policy\_denied" \| "store\_locked" \| "attachment\_too\_large" \| "attachment\_type\_unsupported" \| "machine\_offline" \| "machine\_not\_found" \| "upgrade\_required" \| "tool\_failed" \| "device\_code\_expired" \| "rate\_limited" \| "internal\_error"; details?: Record\<string, unknown\>; hint?: string; message: string; requestId?: string; retryable: boolean \}
