add logs on failure to submit testrun results

This commit is contained in:
Jędrzej Stuczyński
2026-05-23 17:18:45 +01:00
parent e6dd670b16
commit 4645de3eb5
2 changed files with 9 additions and 3 deletions
@@ -3,7 +3,7 @@
[package]
name = "nym-node-status-agent"
version = "2.0.0"
version = "2.0.1-rc0"
authors.workspace = true
edition.workspace = true
license.workspace = true
@@ -2,7 +2,7 @@ use crate::models::{TestrunAssignmentWithTickets, get_testrun, submit_results, s
use anyhow::bail;
use api::ApiPaths;
use nym_crypto::asymmetric::ed25519::{PrivateKey, Signature};
use tracing::{instrument, warn};
use tracing::{error, instrument, warn};
mod api;
pub mod auth;
@@ -101,7 +101,13 @@ impl NsApiClient {
.json(&submit_results)
.send()
.await
.and_then(|response| response.error_for_status())?;
.inspect_err(|err| error!("result submission failure: {err}"))
.and_then(|response| {
if response.status().is_client_error() {
error!("result submission failure: {response:?}")
}
response.error_for_status()
})?;
tracing::debug!("Submitted results: {})", res.status());
Ok(())