Skip to content

Commit

Permalink
chore: tweak status code of promql errors (#2883)
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia authored Dec 6, 2023
1 parent f74715c commit 2cca267
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/promql/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down

0 comments on commit 2cca267

Please sign in to comment.