diff --git a/src/client/http_client.rs b/src/client/http_client.rs index a7cf6a60..0701e661 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -1106,10 +1106,8 @@ impl H2Client { let status = resp.status(); if !status.is_success() { - H2Client::h2api_response(resp) - .map(|_| Err(format_err!("unknown error"))) - .await?; - unreachable!(); + H2Client::h2api_response(resp).await?; // raise error + unreachable!(); } let mut body = resp.into_body();