diff --git a/vmm/src/api/http/mod.rs b/vmm/src/api/http/mod.rs index 3461c08af..f7cea4faf 100644 --- a/vmm/src/api/http/mod.rs +++ b/vmm/src/api/http/mod.rs @@ -15,7 +15,7 @@ use std::sync::mpsc::Sender; use std::thread; use hypervisor::HypervisorType; -use log::error; +use log::{error, info}; use micro_http::{ Body, HttpServer, MediaType, Method, Request, Response, ServerError, StatusCode, Version, }; @@ -90,6 +90,8 @@ pub fn error_response(error: HttpError, status: StatusCode) -> Response { .map(|error| format!("{error}")) .collect::>(); + info!("HTTP API error response: {}", error_messages.join(": ")); + // TODO: Move `api` module from `vmm` to dedicated crate and use a common type definition let json = serde_json::to_string(&error_messages).unwrap();