From 90357fbc45bd2c373f70a12bccc55cf7839112b7 Mon Sep 17 00:00:00 2001 From: Nikita Kalyanov Date: Thu, 16 Nov 2023 21:24:13 +0100 Subject: [PATCH] match more precise --- compute_tools/src/http/api.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/compute_tools/src/http/api.rs b/compute_tools/src/http/api.rs index f77ee8ed41..fcff42e6b1 100644 --- a/compute_tools/src/http/api.rs +++ b/compute_tools/src/http/api.rs @@ -214,10 +214,13 @@ async fn routes(req: Request, compute: &Arc) -> Response (), + _ => { + let mut err_resp = Response::new(Body::from("query failed")); + *err_resp.status_mut() = StatusCode::INTERNAL_SERVER_ERROR; + return err_resp; + } } Response::new(Body::from("")) }