Skip to content

claude-code-driver / isClaudeSessionError

Function: isClaudeSessionError() ​

ts
function isClaudeSessionError(e, code?): e is ClaudeSessionError;

Defined in: api/map-errors.ts:43

True for any ClaudeSessionError-shaped value (any package copy); with code, only for that public code.

Parameters ​

ParameterType
eunknown
code?| "E_TRUST_REQUIRED" | "E_HOOKS_UNAVAILABLE" | "E_BUSY" | "E_SUBMIT_UNCONFIRMED" | "E_INPUT_REJECTED" | "E_PERMISSION_INVALID" | "E_USAGE_LIMIT" | "E_SESSION_EXITED" | "E_SESSION_CLOSED" | "E_CONFIG" | "E_ENVIRONMENT" | "E_VERSION_MISMATCH" | "E_AUTH" | "E_STARTUP" | "E_TURN_FAILED" | "E_SECURITY" | "E_TIMEOUT" | "E_INTERNAL"

Returns ​

e is ClaudeSessionError

Released under the MIT License. Not affiliated with Anthropic.