MeiliSearch/index-scheduler/src/error.rs

24 lines
596 B
Rust
Raw Normal View History

2022-09-06 23:49:19 +02:00
use milli::heed;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("Index `{0}` not found")]
IndexNotFound(String),
#[error("Index `{0}` already exists")]
IndexAlreadyExists(String),
2022-09-06 23:49:19 +02:00
#[error("Corrupted task queue.")]
CorruptedTaskQueue,
#[error(transparent)]
Heed(#[from] heed::Error),
#[error(transparent)]
Milli(#[from] milli::Error),
2022-09-07 20:30:33 +02:00
#[error("{0}")]
IndexError(#[from] index::error::IndexError),
#[error(transparent)]
IoError(#[from] std::io::Error),
2022-09-06 23:49:19 +02:00
#[error(transparent)]
Anyhow(#[from] anyhow::Error),
}