decompose error messages

This commit is contained in:
marin postma
2021-06-24 10:53:51 +02:00
parent a2368db154
commit a1d34faaad
7 changed files with 32 additions and 32 deletions

View File

@ -6,15 +6,15 @@ pub type Result<T> = std::result::Result<T, IndexActorError>;
#[derive(thiserror::Error, Debug)]
pub enum IndexActorError {
#[error("index error: {0}")]
#[error("{0}")]
IndexError(#[from] IndexError),
#[error("index already exists")]
#[error("Index already exists")]
IndexAlreadyExists,
#[error("index doesn't exists")]
#[error("Index not found")]
UnexistingIndex,
#[error("existing primary key")]
#[error("A primary key is already present. It's impossible to update it")]
ExistingPrimaryKey,
#[error("internal Index Error: {0}")]
#[error("Internal Error: {0}")]
Internal(Box<dyn std::error::Error + Send + Sync + 'static>),
#[error("{0}")]
Milli(#[from] milli::Error),