diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-08-25 20:24:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 20:24:18 -0400 |
commit | 376665d1154501660e7b20f760a0482509cff8b0 (patch) | |
tree | 0a979722c66f8ede48f1dff21c8ceb335521a94a /cli/npm/cache.rs | |
parent | 0fe590bbcbf270b50abd8d73db1c5e0be69591f1 (diff) |
fix: avoid global declaration collisions in cjs (#15608)
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
Diffstat (limited to 'cli/npm/cache.rs')
-rw-r--r-- | cli/npm/cache.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs index 5e6fb7ca8..f3436f7c0 100644 --- a/cli/npm/cache.rs +++ b/cli/npm/cache.rs @@ -210,7 +210,16 @@ impl NpmCache { if response.status() == 404 { bail!("Could not find npm package tarball at: {}", dist.tarball); } else if !response.status().is_success() { - bail!("Bad response: {:?}", response.status()); + let status = response.status(); + let maybe_response_text = response.text().await.ok(); + bail!( + "Bad response: {:?}{}", + status, + match maybe_response_text { + Some(text) => format!("\n\n{}", text), + None => String::new(), + } + ); } else { let bytes = response.bytes().await?; |