Log .send() error, rather than returning.

Closes https://github.com/chirpstack/chirpstack-docker/issues/80.
This commit is contained in:
Orne Brocaar 2023-04-11 15:10:08 +01:00
parent e93d3bc534
commit ef0a97ab3d

View File

@ -57,10 +57,15 @@ impl Integration {
.query(&[("event", event)])
.headers(headers.clone())
.send()
.await?;
.await;
match res.error_for_status() {
Ok(_) => {}
match res {
Ok(res) => match res.error_for_status() {
Ok(_) => {}
Err(e) => {
error!(event = %event, url = %url, error = %e, "Posting event failed");
}
},
Err(e) => {
error!(event = %event, url = %url, error = %e, "Posting event failed");
}