Skip to content

Commit

Permalink
queryVersions: Tweak 404 error messaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Sep 15, 2023
1 parent 0920d4b commit cf7fe3e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib/queryVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,9 @@ async function queryVersions(packageMap: Index<VersionSpec>, options: Options =
const errorMessage = err ? (err.message || err).toString() : ''
if (errorMessage.match(/E404|ENOTFOUND|404 Not Found/i)) {
return {
error: `${errorMessage.replace(
/ - Not found$/i,
'',
)}. Either your internet connection is down or unstable and all ${
error: `${errorMessage.replace(/ - Not found$/i, '')}. All ${
options.retry
} retry attempts failed, or the registry is not accessible, or the package does not exist.`,
} retry attempts failed. Either your internet connection is down, the registry is inaccessible, the authentication credentials are invalid, or the package does not exist.`,
}
} else {
// print a hint about the --timeout option for network timeout errors
Expand Down

0 comments on commit cf7fe3e

Please sign in to comment.