Enum meilisearch_sdk::errors::ErrorCode [−][src]
#[non_exhaustive]
pub enum ErrorCode {
Show variants
IndexCreationFailed,
IndexAlreadyExists,
IndexNotFound,
InvalidIndexUid,
IndexNotAccessible,
InvalidState,
MissingPrimaryKey,
PrimaryKeyAlreadyPresent,
MaxFieldsLimitExceeded,
MissingDocumentId,
InvalidFacet,
InvalidFilter,
BadParameter,
BadRequest,
DocumentNotFound,
InternalError,
InvalidToken,
Maintenance,
MissingAuthorizationHeader,
NotFound,
PayloadTooLarge,
UnretrievableDocument,
SearchError,
UnsupportedMediaType,
DumpAlreadyInProgress,
DumpProcessFailed,
Unknown(UnknownErrorCode),
}Expand description
The error code.
Officially documented at https://docs.meilisearch.com/errors.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
An error occurred while trying to create an index.
An index with this UID already exists. You may want to use the
get_or_create method.
No index was found with that UID. You may want to use the get_or_create method.
There was an error in the provided index format. Index UIDs can only be composed of alphanumeric characters, hyphens (-), and underscores (_).
An internal error occurred while trying to access the requested index.
The database is in an invalid state. Deleting the database and re-indexing should solve the problem.
MeiliSearch couldn’t infer the primary key for the given documents. Consider specifying the key manually.
The index already has a set primary key which can’t be changed.
A document was added with more than 65,535 fields.
A document is missing its primary key.
The facet provided with the search was invalid.
The filter provided with the search was invalid.
The request contains invalid parameters, check the error message for more information.
The request is invalid, check the error message for more information.
The requested document can’t be retrieved. Either it doesn’t exist, or the database was left in an inconsistent state.
MeiliSearch experienced an internal error. Check the error message and open an issue if necessary.
The provided token is invalid.
The MeiliSearch instance is under maintenance.
The requested resources are protected with an API key, which was not provided in the request header.
The requested resources could not be found.
The payload sent to the server was too large.
The document exists in store, but there was an error retrieving it. This is likely caused by an inconsistent state in the database.
There was an error in the search.
The payload content type is not supported by MeiliSearch. Currently, MeiliSearch only supports JSON payloads.
A dump creation is already in progress and a new one can’t be triggered until the previous dump creation is not finished.
An error occured during dump creation process, task aborted.
Unknown(UnknownErrorCode)That’s unexpected. Please open a GitHub issue after ensuring you are using the supported version of the MeiliSearch server.
Implementations
Converts the error code to the string representation returned by MeiliSearch.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ErrorCodeimpl UnwindSafe for ErrorCodeBlanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. 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