Skip to content

Commit

Permalink
queryVersions: Ignore E404 Bad Request (#1468).
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Oct 24, 2024
1 parent bb26659 commit be6d767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/queryVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async function queryVersions(packageMap: Index<VersionSpec>, options: Options =
: (versionResult?.version ?? null)
} catch (err: any) {
const errorMessage = err ? (err.message || err).toString() : ''
if (errorMessage.match(/E404|ENOTFOUND|404 Not Found/i)) {
if (errorMessage.match(/E400|E404|ENOTFOUND|404 Not Found|400 Bad Request/i)) {
return {
error: `${errorMessage.replace(/ - Not found$/i, '')}. All ${
options.retry
Expand Down

0 comments on commit be6d767

Please sign in to comment.