From 7c6e8ce534097388594c7d63538eb7272fd9322b Mon Sep 17 00:00:00 2001 From: Christoph Herzog Date: Tue, 9 Jan 2024 14:36:31 +0100 Subject: [PATCH] chore(wasix): Increase log level for WapmSource Needed for debugging. --- lib/wasix/src/runtime/resolver/wapm_source.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/wasix/src/runtime/resolver/wapm_source.rs b/lib/wasix/src/runtime/resolver/wapm_source.rs index 74ea8d4c1ba..e432f2ef864 100644 --- a/lib/wasix/src/runtime/resolver/wapm_source.rs +++ b/lib/wasix/src/runtime/resolver/wapm_source.rs @@ -87,6 +87,21 @@ impl WapmSource { if !response.is_ok() { let url = &self.registry_endpoint; let status = response.status; + + let body = if let Some(body) = &response.body { + String::from_utf8_lossy(body).into_owned() + } else { + "".to_string() + }; + + tracing::warn!( + %url, + %status, + package=%package_name, + %body, + "failed to query package info from registry" + ); + anyhow::bail!("\"{url}\" replied with {status}"); }