From 04f0d5d9efcf1bc224668c3a4f08a965f0b12ed3 Mon Sep 17 00:00:00 2001 From: Ruslan Pislari Date: Tue, 9 Jun 2026 09:52:11 +0300 Subject: [PATCH] feat: enhance error logging in WASI HTTP handler --- crates/http-service/src/executor/wasi_http.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/http-service/src/executor/wasi_http.rs b/crates/http-service/src/executor/wasi_http.rs index 3638f40..05b5490 100644 --- a/crates/http-service/src/executor/wasi_http.rs +++ b/crates/http-service/src/executor/wasi_http.rs @@ -165,6 +165,10 @@ where .await? { tracing::warn!(cause=?e, "incoming handler"); + // log to application logger error + if let Some(ref logger) = store.data().logger { + logger.write_msg(format!("Execution error: {}", e)).await; + } return Err(e); }; @@ -181,7 +185,7 @@ where stats.status_code(response.status().as_u16()); Ok(response) } - Ok(Err(e)) => Err(e.into()), + Ok(Err(error)) => Err(error.into()), Err(_) => { let e = match task.await { Ok(r) => {