mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 12:54:26 +01:00
remove useless dump errors
This commit is contained in:
parent
49d8fadb52
commit
3015265bde
@ -7,10 +7,6 @@ pub type Result<T> = std::result::Result<T, DumpError>;
|
|||||||
|
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
pub enum DumpError {
|
pub enum DumpError {
|
||||||
#[error("A dump is already processing. You must wait until the current process is finished before requesting another dump.")]
|
|
||||||
DumpAlreadyRunning,
|
|
||||||
#[error("Dump `{0}` not found.")]
|
|
||||||
DumpDoesNotExist(String),
|
|
||||||
#[error("An internal error has occurred. `{0}`.")]
|
#[error("An internal error has occurred. `{0}`.")]
|
||||||
Internal(Box<dyn std::error::Error + Send + Sync + 'static>),
|
Internal(Box<dyn std::error::Error + Send + Sync + 'static>),
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
@ -32,8 +28,6 @@ internal_error!(
|
|||||||
impl ErrorCode for DumpError {
|
impl ErrorCode for DumpError {
|
||||||
fn error_code(&self) -> Code {
|
fn error_code(&self) -> Code {
|
||||||
match self {
|
match self {
|
||||||
DumpError::DumpAlreadyRunning => Code::DumpAlreadyInProgress,
|
|
||||||
DumpError::DumpDoesNotExist(_) => Code::DumpNotFound,
|
|
||||||
DumpError::Internal(_) => Code::Internal,
|
DumpError::Internal(_) => Code::Internal,
|
||||||
DumpError::IndexResolver(e) => e.error_code(),
|
DumpError::IndexResolver(e) => e.error_code(),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user