pub enum Error {
Show 15 variants
Inference(String),
ContextLengthExceeded(String),
RetriesExceeded(String),
NonRetryable(String),
Parse(String),
Validation(String),
ToolNotFound(String),
Network(Error),
Json(Error),
Utf8(Utf8Error),
FromUtf8(FromUtf8Error),
Io(Error),
InvalidProvider(String),
MissingApiKey(String),
RuntimeNotUsed,
}Expand description
Main error type for Reson operations
Variants§
Inference(String)
Retryable inference error (network issues, rate limits, 5xx errors)
ContextLengthExceeded(String)
Context length exceeded (prompt + completion too long)
RetriesExceeded(String)
Maximum retries exhausted (includes last error for context)
NonRetryable(String)
Non-retryable error (validation, 4xx errors)
Parse(String)
Parse error when parsing LLM output
Validation(String)
Validation error for structured outputs
ToolNotFound(String)
Tool not found in registry
Network(Error)
Network error from reqwest
Json(Error)
JSON serialization/deserialization error
Utf8(Utf8Error)
UTF-8 encoding error
FromUtf8(FromUtf8Error)
UTF-8 conversion error from String
Io(Error)
IO error
InvalidProvider(String)
Invalid provider specified
MissingApiKey(String)
Missing API key
RuntimeNotUsed
Runtime not used (validation error)
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if error is retryable (suitable for backoff retry)
Sourcepub fn is_retries_exceeded(&self) -> bool
pub fn is_retries_exceeded(&self) -> bool
Check if error indicates retries were exceeded
Sourcepub fn is_incomplete(&self) -> bool
pub fn is_incomplete(&self) -> bool
Check if error indicates incomplete/partial data (for streaming)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.