Closed ggrossetie closed 3 years ago
In asynchronous mode, onerror
is called but as far as I understand we cannot retrieve the cause.
The browser (in the developer tools) displays an error: GET http://nodns/ net::ERR_NAME_NOT_RESOLVED
.
Both response
and responseText
are empty.
Original work by @djencks
In the browser, the following code will throw an exception:
The error is a
DOMException
(which is not available in a Node environment) with the following information:I've added a special case to create a similar exception when Node throws a
ENOTFOUND
fromdns.lookup
.