pub enum LlmrixError {
Transport(Error),
Json(Error),
Api {
status: u16,
message: String,
body: String,
},
Auth {
status: u16,
message: String,
},
Stream(String),
Other(String),
}Expand description
All errors returned by the Llmrix SDK.
Variants§
Transport(Error)
Low-level HTTP / connection failure.
Json(Error)
JSON serialization or deserialization failure.
Api
The server returned a 4xx or 5xx status.
Inspect status to branch on specific codes (e.g. 404, 429).
Auth
Returned on HTTP 401 (invalid API key) or 503 (server running in native mode without auth configured).
Stream(String)
Returned when the SSE stream cannot be read or parsed.
Other(String)
General SDK-level error.
Trait Implementations§
Source§impl Debug for LlmrixError
impl Debug for LlmrixError
Source§impl Display for LlmrixError
impl Display for LlmrixError
Source§impl Error for LlmrixError
impl Error for LlmrixError
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 LlmrixError
impl From<Error> for LlmrixError
Auto Trait Implementations§
impl !RefUnwindSafe for LlmrixError
impl !UnwindSafe for LlmrixError
impl Freeze for LlmrixError
impl Send for LlmrixError
impl Sync for LlmrixError
impl Unpin for LlmrixError
impl UnsafeUnpin for LlmrixError
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