Skip to content

Commit

Permalink
feat: better error message for network error
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodonisko committed Apr 18, 2024
1 parent c64644a commit d8f639b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .yarn/versions/11826db1.yml
@@ -0,0 +1,32 @@
releases:
"@yarnpkg/builder": patch
"@yarnpkg/cli": patch
"@yarnpkg/core": patch
"@yarnpkg/doctor": patch
"@yarnpkg/extensions": patch
"@yarnpkg/nm": patch
"@yarnpkg/plugin-compat": patch
"@yarnpkg/plugin-constraints": patch
"@yarnpkg/plugin-dlx": patch
"@yarnpkg/plugin-essentials": patch
"@yarnpkg/plugin-exec": patch
"@yarnpkg/plugin-file": patch
"@yarnpkg/plugin-git": patch
"@yarnpkg/plugin-github": patch
"@yarnpkg/plugin-http": patch
"@yarnpkg/plugin-init": patch
"@yarnpkg/plugin-interactive-tools": patch
"@yarnpkg/plugin-link": patch
"@yarnpkg/plugin-nm": patch
"@yarnpkg/plugin-npm": patch
"@yarnpkg/plugin-npm-cli": patch
"@yarnpkg/plugin-pack": patch
"@yarnpkg/plugin-patch": patch
"@yarnpkg/plugin-pnp": patch
"@yarnpkg/plugin-pnpm": patch
"@yarnpkg/plugin-stage": patch
"@yarnpkg/plugin-typescript": patch
"@yarnpkg/plugin-version": patch
"@yarnpkg/plugin-workspace-tools": patch
"@yarnpkg/pnpify": patch
"@yarnpkg/sdks": patch
2 changes: 1 addition & 1 deletion packages/yarnpkg-core/sources/httpUtils.ts
Expand Up @@ -61,7 +61,7 @@ async function prettyNetworkError(response: Promise<Response>, {configuration, c

if (message == null) {
if (err.message.startsWith(`Response code`)) {
message = `The remote server failed to provide the requested resource`;
message = `The remote server failed to provide the requested resource (${err.response?.statusCode} ${err.request?.options?.method} ${err.request?.options?.url?.href})`;
} else {
message = err.message;
}
Expand Down

0 comments on commit d8f639b

Please sign in to comment.