From ef0a97ab3d56723b6e5a11f19e56f32ea8bcdf54 Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Tue, 11 Apr 2023 15:10:08 +0100 Subject: [PATCH] Log .send() error, rather than returning. Closes https://github.com/chirpstack/chirpstack-docker/issues/80. --- chirpstack/src/integration/http.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/chirpstack/src/integration/http.rs b/chirpstack/src/integration/http.rs index f19770e4..ebc8038e 100644 --- a/chirpstack/src/integration/http.rs +++ b/chirpstack/src/integration/http.rs @@ -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"); }