From be6d767c2390b22a603880e63575047b2ecdc8c2 Mon Sep 17 00:00:00 2001 From: Raine Revere Date: Thu, 24 Oct 2024 18:59:50 +0000 Subject: [PATCH] queryVersions: Ignore E404 Bad Request (#1468). --- src/lib/queryVersions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/queryVersions.ts b/src/lib/queryVersions.ts index 4368c093..ac3b1428 100644 --- a/src/lib/queryVersions.ts +++ b/src/lib/queryVersions.ts @@ -94,7 +94,7 @@ async function queryVersions(packageMap: Index, 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