Skip to content

Log custom solver errors on quoting#4301

Merged
jmg-duarte merged 1 commit intomainfrom
jmgd/solver_error_log
Mar 31, 2026
Merged

Log custom solver errors on quoting#4301
jmg-duarte merged 1 commit intomainfrom
jmgd/solver_error_log

Conversation

@jmg-duarte
Copy link
Copy Markdown
Contributor

Description

Adds a log for the custom error that the solver returned

Context: https://nomevlabs.slack.com/archives/C0375NV72SC/p1774966168341339?thread_ts=1774881240.020949&cid=C0375NV72SC

Changes

  • Log custom error

How to test

NA

@jmg-duarte jmg-duarte requested a review from a team as a code owner March 31, 2026 14:17
@jmg-duarte jmg-duarte added the hotfix Labels PRs that should be applied into production right away label Mar 31, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a warning log to the error mapping logic for custom solver errors in crates/driver/src/infra/api/error.rs. No critical issues found, and I have no feedback to provide.

@jmg-duarte jmg-duarte added this pull request to the merge queue Mar 31, 2026
Merged via the queue into main with commit 62f7d9b Mar 31, 2026
20 of 21 checks passed
@jmg-duarte jmg-duarte deleted the jmgd/solver_error_log branch March 31, 2026 14:59
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2026
@cowprotocol cowprotocol unlocked this conversation Mar 31, 2026
if let quote::Error::Solver(ref solver_err) = value
&& let Some(custom_err) = solver_err.custom_error()
{
tracing::warn!(err=?custom_err, "received custom solver error, mapping to internal errors");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue regarding the warn level. It is more of a debug-level log. In case you are not seeing this log in prod, you can enable it precisely using Unix sockets.

Please keep an eye on the amount of logs it produces in prod. But in any case, this shouldn't be a warning. Many solvers might respond with "invalid response", as we can already see that in the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotfix Labels PRs that should be applied into production right away

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants