We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d2f72f commit 640b85dCopy full SHA for 640b85d
lib/internal/modules/esm/fetch_module.js
@@ -148,6 +148,8 @@ function fetchWithRedirects(parsed) {
148
err.message = `Cannot find module '${parsed.href}', HTTP 404`;
149
throw err;
150
}
151
+ // This condition catches all unsupported status codes, including
152
+ // 3xx redirection codes without `Location` HTTP header
153
if (res.statusCode < 200 || res.statusCode >= 300) {
154
throw new ERR_NETWORK_IMPORT_DISALLOWED(
155
res.headers.location,
0 commit comments