chore: add an opaque error type in meta (#959)

add boxed err in meta
This commit is contained in:
fys
2023-02-08 17:47:33 +08:00
committed by GitHub
parent 83d57f9111
commit 4ce62f850b

View File

@@ -212,6 +212,12 @@ pub enum Error {
source: http::Error,
backtrace: Backtrace,
},
#[snafu(display("An error occurred in Meta, source: {}", source))]
MetaInternal {
#[snafu(backtrace)]
source: BoxedError,
},
}
pub type Result<T> = std::result::Result<T, Error>;
@@ -269,6 +275,7 @@ impl ErrorExt for Error {
| Error::Unexpected { .. } => StatusCode::Unexpected,
Error::TableNotFound { .. } => StatusCode::TableNotFound,
Error::InvalidCatalogValue { source, .. } => source.status_code(),
Error::MetaInternal { source } => source.status_code(),
}
}
}