From 775c9633f08f289acf8faa8f0e6aa46b280af9bc Mon Sep 17 00:00:00 2001 From: Eric Kidd Date: Fri, 1 Mar 2024 10:45:27 -0500 Subject: [PATCH] trino: Retry based on error_name, not error_type The standard error output is misleading about which field is field. --- src/drivers/trino/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/drivers/trino/mod.rs b/src/drivers/trino/mod.rs index edae489..04f8fd4 100644 --- a/src/drivers/trino/mod.rs +++ b/src/drivers/trino/mod.rs @@ -350,9 +350,7 @@ impl fmt::Display for TrinoString<'_> { /// and network errors, so we don't need to worry about that. But we do need /// to look out for `QueryError`s that might need to be retried. fn should_retry(e: &PrustoError) -> bool { - // Temporary debugging code to figure out why this isn't triggering. - eprintln!("Trino error: {:?}", e); - matches!(e, PrustoError::QueryError(QueryError { error_type, .. }) if error_type == "NO_NODES_AVAILABLE") + matches!(e, PrustoError::QueryError(QueryError { error_name, .. }) if error_name == "NO_NODES_AVAILABLE") } /// These errors are pages long.