#[non_exhaustive]pub enum RagError {
Config(String),
Input(String),
Auth(String),
RateLimit {
message: String,
retry_after_ms: Option<u64>,
},
Http {
status: u16,
message: String,
},
Network(String),
Decode(String),
Store(String),
NotFound(String),
Io(String),
Model(String),
Unsupported(String),
}Expand description
Error from an embedder, store, reranker or retriever.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Config(String)
Invalid configuration (missing dataset, bad URL, unknown provider…).
Input(String)
Invalid request input (empty query, dimension mismatch…).
Auth(String)
Credentials were rejected.
RateLimit
The provider is rate limiting requests.
Http
Non-success HTTP status not covered by a more specific variant.
Network(String)
Connection / transport failure.
Decode(String)
The response could not be decoded.
Store(String)
Vector store failure.
NotFound(String)
Unknown dataset or document.
Io(String)
Local persistence failure.
Model(String)
An in-process model could not be loaded or run (missing or corrupt files, unsupported architecture, inference failure).
Unsupported(String)
The dataset or store does not support this operation (e.g. listing the documents of an external retriever).
Implementations§
Trait Implementations§
impl Eq for RagError
Source§impl Error for RagError
impl Error for RagError
1.30.0 · 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()
impl StructuralPartialEq for RagError
Auto Trait Implementations§
impl Forget for RagError
impl Freeze for RagError
impl Move for RagError
impl RefUnwindSafe for RagError
impl Send for RagError
impl Sync for RagError
impl Unpin for RagError
impl UnsafeUnpin for RagError
impl UnwindSafe for RagError
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§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.