mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
chore: add interceptor err in frontend::error::Error (#917)
* chore: add interceptor boxed err * chore: rename * chore: update err msg Co-authored-by: fys <40801205+Fengys123@users.noreply.github.com> --------- Co-authored-by: fys <40801205+Fengys123@users.noreply.github.com>
This commit is contained in:
@@ -398,6 +398,12 @@ pub enum Error {
|
||||
column: String,
|
||||
backtrace: Backtrace,
|
||||
},
|
||||
|
||||
#[snafu(display("SQL execution intercepted, source: {}", source))]
|
||||
SqlExecIntercepted {
|
||||
#[snafu(backtrace)]
|
||||
source: BoxedError,
|
||||
},
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
@@ -419,6 +425,7 @@ impl ErrorExt for Error {
|
||||
Error::RuntimeResource { source, .. } => source.status_code(),
|
||||
|
||||
Error::StartServer { source, .. } => source.status_code(),
|
||||
Error::SqlExecIntercepted { source, .. } => source.status_code(),
|
||||
|
||||
Error::ParseSql { source } | Error::AlterExprFromStmt { source } => {
|
||||
source.status_code()
|
||||
|
||||
Reference in New Issue
Block a user