#[non_exhaustive]pub enum Error {
Show 14 variants
Meilisearch(MeilisearchError),
MeilisearchCommunication(MeilisearchCommunicationError),
ParseError(Error),
Timeout,
InvalidRequest,
CantUseWithoutApiKey(String),
TenantTokensInvalidApiKey,
TenantTokensExpiredSignature,
InvalidTenantToken(Error),
HttpError(Error),
Yaup(Error),
Uuid(Error),
InvalidUuid4Version,
Other(Box<dyn Error + Send + Sync + 'static>),
}
Expand description
An enum representing the errors that can occur.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Meilisearch(MeilisearchError)
The exhaustive list of Meilisearch errors: https://github.com/meilisearch/specifications/blob/main/text/0061-error-format-and-definitions.md
Also check out: https://github.com/meilisearch/meilisearch/blob/main/crates/meilisearch-types/src/error.rs
MeilisearchCommunication(MeilisearchCommunicationError)
ParseError(Error)
The Meilisearch server returned an invalid JSON for a request.
Timeout
A timeout happened while waiting for an update to complete.
InvalidRequest
This Meilisearch SDK generated an invalid request (which was not sent).
It probably comes from an invalid API key resulting in an invalid HTTP header.
CantUseWithoutApiKey(String)
Can’t call this method without setting an api key in the client.
TenantTokensInvalidApiKey
It is not possible to generate a tenant token with an invalid api key.
Empty strings or with less than 8 characters are considered invalid.
TenantTokensExpiredSignature
It is not possible to generate an already expired tenant token.
InvalidTenantToken(Error)
When jsonwebtoken cannot generate the token successfully.
HttpError(Error)
The http client encountered an error.
Yaup(Error)
The library formatting the query parameters encountered an error.
Uuid(Error)
The library validating the format of an uuid.
InvalidUuid4Version
Error thrown in case the version of the Uuid is not v4.
Other(Box<dyn Error + Send + Sync + 'static>)
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
Source§impl From<MeilisearchCommunicationError> for Error
impl From<MeilisearchCommunicationError> for Error
Source§fn from(source: MeilisearchCommunicationError) -> Self
fn from(source: MeilisearchCommunicationError) -> Self
Source§impl From<MeilisearchError> for Error
impl From<MeilisearchError> for Error
Source§fn from(source: MeilisearchError) -> Self
fn from(source: MeilisearchError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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
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>
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>
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 moreSource§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.