From ff0ecc95fb114abd8c61ff605b11be63f6814962 Mon Sep 17 00:00:00 2001 From: benedettadavico Date: Tue, 19 May 2026 15:21:00 +0200 Subject: [PATCH] fix compile error --- .../nym-node-status-client/src/lib.rs | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/nym-node-status-api/nym-node-status-client/src/lib.rs b/nym-node-status-api/nym-node-status-client/src/lib.rs index 27aac8b538..20370a5d63 100644 --- a/nym-node-status-api/nym-node-status-client/src/lib.rs +++ b/nym-node-status-api/nym-node-status-client/src/lib.rs @@ -68,19 +68,19 @@ impl NsApiClient { } } - serde_json::from_str(&response_text) - .map(|testrun: TestrunAssignmentWithTickets| { - tracing::info!( - testrun_id = testrun.assignment.testrun_id, - gateway = %testrun.assignment.gateway_identity_key, - "Received testrun assignment", - ); - testrun - }) - .map_err(|err| { + let testrun: TestrunAssignmentWithTickets = + serde_json::from_str(&response_text).map_err(|err| { tracing::error!("{err}"); - err.into() - }) + anyhow::Error::from(err) + })?; + + tracing::info!( + testrun_id = testrun.assignment.testrun_id, + gateway = %testrun.assignment.gateway_identity_key, + "Received testrun assignment", + ); + + Ok(Some(testrun)) } #[instrument(level = "info", skip_all)] @@ -118,19 +118,19 @@ impl NsApiClient { } } - serde_json::from_str(&response_text) - .map(|testrun: TestrunAssignmentWithTickets| { - tracing::info!( - testrun_id = testrun.assignment.testrun_id, - gateway = %testrun.assignment.gateway_identity_key, - "Received ports-check testrun assignment", - ); - testrun - }) - .map_err(|err| { + let testrun: TestrunAssignmentWithTickets = + serde_json::from_str(&response_text).map_err(|err| { tracing::error!("{err}"); - err.into() - }) + anyhow::Error::from(err) + })?; + + tracing::info!( + testrun_id = testrun.assignment.testrun_id, + gateway = %testrun.assignment.gateway_identity_key, + "Received ports-check testrun assignment", + ); + + Ok(Some(testrun)) } #[instrument(level = "info", fields(testrun_id, assigned_at_utc), skip_all)] @@ -171,7 +171,7 @@ impl NsApiClient { response.error_for_status() })?; - tracing::debug!("Submitted results: {})", res.status()); + tracing::debug!("Submitted results: {}", res.status()); Ok(()) } @@ -204,7 +204,7 @@ impl NsApiClient { .await .and_then(|response| response.error_for_status())?; - tracing::debug!("Submitted results with context: {})", res.status()); + tracing::debug!("Submitted results with context: {}", res.status()); Ok(()) } @@ -238,7 +238,7 @@ impl NsApiClient { .await .and_then(|response| response.error_for_status())?; - tracing::debug!("Submitted ports-check results: {})", res.status()); + tracing::debug!("Submitted ports-check results: {}", res.status()); Ok(()) }