-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loadersstale
Description
What is the problem this feature will solve?
When a 404 not found response is made for an HTTP/s import, the error thrown is currently:
Error [ERR_NETWORK_IMPORT_BAD_RESPONSE]: import 'https://h3manth.com/foo' received a bad response: HTTP response returned status code of 404
it might be useful to convert this into a full ERR_MODULE_NOT_FOUND
error to properly match semantics in error handling code paths.
What is the feature you are proposing to solve the problem?
Return an ERR_MODULE_NOT_FOUND
for 404 network errors in HTTP/s imports.
What alternatives have you considered?
Keeping it as a custom error or network not found error creates divergence between local and remote resolvers. It can be useful to streamline the error path handling by having a singular code to check.
JakobJingleheimer, juanmjacobs and hemanth
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.loadersIssues and PRs related to ES module loadersIssues and PRs related to ES module loadersstale