send: add error reporting

This commit is contained in:
Astro 2023-03-03 02:20:26 +01:00
parent e207dda2fe
commit e2d1d35a6d

View file

@ -87,7 +87,9 @@ pub async fn send_raw(
Ok(())
} else {
histogram!("relay_http_response_duration", t3 - t2, "res" => "err", "host" => host);
tracing::error!("send_raw {} response HTTP {}", url, res.status());
let response = res.text().await?;
tracing::error!("send_raw {} response body: {:?}", url, response);
Err(SendError::Response(response))
}
}