From a766ac3dc7d90e04c58ab15a0d653926f841d642 Mon Sep 17 00:00:00 2001 From: Jere Vaara Date: Thu, 10 Oct 2024 12:37:40 +0300 Subject: [PATCH] Add error response status code --- compute_tools/src/http/api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compute_tools/src/http/api.rs b/compute_tools/src/http/api.rs index b70c1ac802..83e95652b2 100644 --- a/compute_tools/src/http/api.rs +++ b/compute_tools/src/http/api.rs @@ -119,7 +119,7 @@ async fn routes(req: Request, compute: &Arc) -> Response Response::new(Body::from("true")), Err(e) => { error!("install_extension failed: {}", e); - Response::new(Body::from(e.to_string())) + render_json_error(&e.to_string(), StatusCode::INTERNAL_SERVER_ERROR) } } }