pub enum ErrorCode {
Show 14 variants
BinaryNotFound = 1,
SessionNotFound = 2,
PermissionDenied = 3,
McpError = 4,
ConfigError = 5,
InvalidInput = 6,
Timeout = 7,
SerializationError = 8,
IoError = 9,
ProcessError = 10,
StreamClosed = 11,
NotAuthenticated = 12,
RateLimitExceeded = 13,
Utf8Error = 14,
}
Expand description
Error codes for Claude AI SDK operations
Each error type has a unique code that can be used for programmatic error handling
and troubleshooting. Error codes follow the pattern: CXXX
where X is a digit.
Variants§
BinaryNotFound = 1
C001
: Claude binary not found
SessionNotFound = 2
C002
: Session not found
PermissionDenied = 3
C003
: Permission denied
McpError = 4
C004
: MCP server error
ConfigError = 5
C005
: Configuration error
InvalidInput = 6
C006
: Invalid input
Timeout = 7
C007
: Operation timeout
SerializationError = 8
C008
: Serialization error
IoError = 9
C009
: I/O error
ProcessError = 10
C010
: Process execution error
StreamClosed = 11
C011
: Stream closed
NotAuthenticated = 12
C012
: Not authenticated
RateLimitExceeded = 13
C013
: Rate limit exceeded
Utf8Error = 14
C014
: UTF-8 conversion error
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more