mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
decompose error messages
This commit is contained in:
parent
a2368db154
commit
a1d34faaad
7 changed files with 32 additions and 32 deletions
|
@ -4,13 +4,13 @@ pub type Result<T> = std::result::Result<T, UuidResolverError>;
|
|||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum UuidResolverError {
|
||||
#[error("name already exist.")]
|
||||
#[error("Index already exists.")]
|
||||
NameAlreadyExist,
|
||||
#[error("index \"{0}\" doesn't exist.")]
|
||||
#[error("Index \"{0}\" not found.")]
|
||||
UnexistingIndex(String),
|
||||
#[error("badly formatted index uid: {0}")]
|
||||
#[error("Index must have a valid uid; Index uid can be of type integer or string only composed of alphanumeric characters, hyphens (-) and underscores (_).")]
|
||||
BadlyFormatted(String),
|
||||
#[error("internal error resolving index uid: {0}")]
|
||||
#[error("Internal error: {0}")]
|
||||
Internal(Box<dyn std::error::Error + Sync + Send + 'static>),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue