From d4c2e9ab41345a5f46fa6191fb063f52dc16a569 Mon Sep 17 00:00:00 2001 From: Omaid Faizyar Date: Sat, 28 Mar 2026 20:03:34 -0700 Subject: [PATCH] fix: return error on oracle fetch failure instead of silently continuing Previously, if fetch_signed_context failed, the error was logged as a warning and execution proceeded with empty signed_context. This is inconsistent with the quoting and candidate-building paths, which both treat oracle failure as a hard error. Orders should not execute without oracle price data. Ref: rainlanguage/raindex#2531 --- crates/common/src/raindex_client/take_orders/single.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/common/src/raindex_client/take_orders/single.rs b/crates/common/src/raindex_client/take_orders/single.rs index 1e6741d48b..915ac92cff 100644 --- a/crates/common/src/raindex_client/take_orders/single.rs +++ b/crates/common/src/raindex_client/take_orders/single.rs @@ -159,7 +159,8 @@ pub async fn execute_single_take( match crate::oracle::fetch_signed_context(&url, body).await { Ok(ctx) => candidate.signed_context = vec![ctx], Err(e) => { - tracing::warn!("Failed to fetch oracle data: {}", e); + tracing::error!("Oracle fetch failed, skipping order execution: {}", e); + return Err(e.into()); } } }