From 2cca267a32455948e232aad382688ba259349c82 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Wed, 6 Dec 2023 21:50:53 +0800 Subject: [PATCH] chore: tweak status code of promql errors (#2883) Signed-off-by: Ruihang Xia --- src/promql/src/error.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/promql/src/error.rs b/src/promql/src/error.rs index 4e9b3bb3be6a..7202aa5a7ac5 100644 --- a/src/promql/src/error.rs +++ b/src/promql/src/error.rs @@ -147,13 +147,12 @@ impl ErrorExt for Error { | Deserialize { .. } | FunctionInvalidArgument { .. } | UnsupportedVectorMatch { .. } - | CombineTableColumnMismatch { .. } => StatusCode::InvalidArguments, - - UnknownTable { .. } + | CombineTableColumnMismatch { .. } | DataFusionPlanning { .. } | UnexpectedPlanExpr { .. } - | IllegalRange { .. } - | EmptyRange { .. } => StatusCode::Internal, + | IllegalRange { .. } => StatusCode::InvalidArguments, + + UnknownTable { .. } | EmptyRange { .. } => StatusCode::Internal, TableNameNotFound { .. } => StatusCode::TableNotFound,