From e1df66801e83d1fe13cb3e70d420bbc28b8fdc2b Mon Sep 17 00:00:00 2001 From: Martin Beckmann Date: Tue, 24 Oct 2023 09:39:04 +0200 Subject: [PATCH] Parse /settle errors and only warn about them (#2004) # Description https://github.com/cowprotocol/services/pull/1999 had the unfortunate side effect that we spammed a few [alerts](https://cowservices.slack.com/archives/C037PB929ME/p1697812387457109) whenever the driver was not able to settle a solution. # Changes We now only `warn` whenever we can't parse the success response. We didn't introduce, expect and parse any specific error format because eventually drivers will be run externally and maybe not all of them run a driver compliant with the error response spec all the time. If we simply print the parsing error we'll get all the data we can get out of the response anyway. --- crates/autopilot/src/run_loop.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/autopilot/src/run_loop.rs b/crates/autopilot/src/run_loop.rs index 75a6582a16..014ff55957 100644 --- a/crates/autopilot/src/run_loop.rs +++ b/crates/autopilot/src/run_loop.rs @@ -289,7 +289,7 @@ impl RunLoop { Ok(()) => Metrics::settle_ok(driver), Err(err) => { Metrics::settle_err(driver, &err); - tracing::error!(?err, driver = %driver.name, "settlement failed"); + tracing::warn!(?err, driver = %driver.name, "settlement failed"); } } }