mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
api_client: show response body in ServerResponse
Otherwise, you just see output like "Error running command: Server
responded with an error: InternalServerError", which isn't very
helpful. The response body used to be include with the message, but
was removed when the Error enum was converted to thiserror.
Fixes: 5d0d56f5
("api_client: Use thiserror for errors")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
This commit is contained in:
parent
9f53553860
commit
4ad44caa52
@ -20,7 +20,7 @@ pub enum Error {
|
||||
MissingProtocol,
|
||||
#[error("Error parsing HTTP Content-Length field: {0}")]
|
||||
ContentLengthParsing(std::num::ParseIntError),
|
||||
#[error("Server responded with an error: {0:?}")]
|
||||
#[error("Server responded with an error: {0:?}: {1:?}")]
|
||||
ServerResponse(StatusCode, Option<String>),
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user