#[non_exhaustive]pub enum ErrorCode {
Show 24 variants
InvalidJson,
NotInitialized,
VersionMismatch,
InvalidRequest,
Unsupported,
SessionNotFound,
TurnActive,
TurnNotFound,
ApprovalNotFound,
QueueLimit,
QueueNotFound,
QueueConflict,
ComponentError,
DelegationError,
RestartError,
ConfirmError,
ProviderError,
ContextLimit,
StepLimit,
HistoryLimit,
ResponseLimit,
ToolLimit,
InternalError,
Unknown,
}Expand description
Why a request (error) or a turn (turn.failed) failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidJson
The frame is not JSON, or not a message this server knows, such as a
daemon.control action it predates.
NotInitialized
A message other than initialize came first.
VersionMismatch
The client speaks another protocol version; the connection closes.
InvalidRequest
The message is well-formed but its values are refused.
Unsupported
This endpoint does not offer the request, such as component management on stdio.
SessionNotFound
No session, or a different one, is running on this connection.
TurnActive
The session must be idle for this request.
TurnNotFound
The turn named is not running.
ApprovalNotFound
The approval is unknown or already resolved.
QueueLimit
The session’s queue is full.
QueueNotFound
The queued prompt is gone.
QueueConflict
The queued prompt’s revision is stale.
ComponentError
A channel account could not be changed.
DelegationError
A delegation control request named nothing, or an unknown handle.
RestartError
The daemon refused to schedule a restart.
ConfirmError
The daemon could not ask the owner a question (no owner chat to ask in, or one already waiting there), or does not know the one named.
ProviderError
The model provider failed the turn.
ContextLimit
The turn’s history does not fit the model’s context window.
StepLimit
The turn reached agent.max_steps.
HistoryLimit
The turn alone exceeds the session’s history limits.
ResponseLimit
A response exceeded a size limit.
ToolLimit
A response asked for too many tool calls, or too large arguments.
InternalError
A server invariant failed.
Unknown
A code this client does not know, from a newer server.