pub enum LlmConnectorError {
Show 20 variants
AuthenticationError(String),
RateLimitError(String),
NetworkError(String),
InvalidRequest(String),
UnsupportedModel(String),
ProviderError(String),
PermissionError(String),
NotFoundError(String),
ServerError(String),
TimeoutError(String),
ConnectionError(String),
MaxRetriesExceeded(String),
ParseError(String),
ConfigError(String),
StreamingError(String),
StreamingNotSupported(String),
UnsupportedOperation(String),
ApiError(String),
JsonError(Error),
HttpError(Error),
}Expand description
Error types for llm-connector operations
Variants§
AuthenticationError(String)
Authentication failed with the provider
RateLimitError(String)
Rate limit exceeded
NetworkError(String)
Network-related error
InvalidRequest(String)
Invalid request format or parameters
UnsupportedModel(String)
Model not supported by any provider
ProviderError(String)
Provider-specific error
PermissionError(String)
Permission denied error
NotFoundError(String)
Resource not found error
ServerError(String)
Server error (5xx)
TimeoutError(String)
Connection timeout error
ConnectionError(String)
Connection error
MaxRetriesExceeded(String)
Maximum retries exceeded
ParseError(String)
Parse error
ConfigError(String)
Configuration error
StreamingError(String)
Streaming-related error
StreamingNotSupported(String)
Streaming not supported by provider/model
UnsupportedOperation(String)
Unsupported operation error
ApiError(String)
Generic API error returned by provider
JsonError(Error)
JSON parsing error
HttpError(Error)
HTTP request error
Implementations§
Source§impl LlmConnectorError
impl LlmConnectorError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if the error is retryable
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
Get the HTTP status code for this error
Sourcepub fn from_status_code(status: u16, message: String) -> Self
pub fn from_status_code(status: u16, message: String) -> Self
Create error from HTTP status code
Trait Implementations§
Source§impl Debug for LlmConnectorError
impl Debug for LlmConnectorError
Source§impl Display for LlmConnectorError
impl Display for LlmConnectorError
Source§impl Error for LlmConnectorError
impl Error for LlmConnectorError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for LlmConnectorError
impl From<Error> for LlmConnectorError
Auto Trait Implementations§
impl Freeze for LlmConnectorError
impl !RefUnwindSafe for LlmConnectorError
impl Send for LlmConnectorError
impl Sync for LlmConnectorError
impl Unpin for LlmConnectorError
impl !UnwindSafe for LlmConnectorError
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