Skip to content

Commit

Permalink
chore(wasix): Increase log level for WapmSource
Browse files Browse the repository at this point in the history
Needed for debugging.
  • Loading branch information
theduke committed Jan 25, 2024
1 parent 6263903 commit b1689b8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/wasix/src/runtime/resolver/wapm_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
"<no body>".to_string()
};

tracing::warn!(
%url,
%status,
package=%package_name,
%body,
"failed to query package info from registry"
);

anyhow::bail!("\"{url}\" replied with {status}");
}

Expand Down

0 comments on commit b1689b8

Please sign in to comment.