Enum meilisearch_sdk::errors::Error [−][src]
#[non_exhaustive]
pub enum Error {
MeiliSearchError {
error_message: String,
error_code: ErrorCode,
error_type: ErrorType,
error_link: String,
},
UnreachableServer,
ParseError(Error),
InvalidRequest,
HttpError(Error),
}Expand description
An enum representing the errors that can occur.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
MeiliSearchError
Fields
error_message: StringThe human readable error message
error_code: ErrorCodeThe error code of the error. Officially documented at https://docs.meilisearch.com/errors.
error_type: ErrorTypeThe type of error (invalid request, internal error, or authentication error)
error_link: StringA link to the MeiliSearch documentation for an error.
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/meilisearch-error/src/lib.rs
UnreachableServer
There is no MeiliSearch server listening on the [specified host] (../client/struct.Client.html#method.new).
ParseError(Error)
Tuple Fields
0: ErrorThe MeiliSearch server returned an invalid JSON for a request.
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.
HttpError(Error)
Tuple Fields
0: ErrorThe http client encountered an error.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
