meilisearch/index-scheduler/src/error.rs

30 lines
753 B
Rust
Raw Normal View History

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