When a ENOTFOUND/ETIMEDOUT/ECONNRESET occurs, I would like to display a failing test that gives an explanation to the user of what a ENOTFOUND/ETIMEDOUT/ECONNRESET could indicate.

This all that happens by default:

GET exampleurl
getaddrinfo ENOTFOUND exampleurl

  1. Error
    getaddrinfo ENOTFOUND exampleurl
    at request
    inside “My Request URL”

In Newman, at least, tests at the collection level will still run on an ENOTFOUND, etc., so this is technically possible. The issue is that since this is a node-level error, I have not found a way to detect one of these errors in my test logic. There is no indication in pm.request, pm.response, or responseCode.

Anyone have any ideas how this could be accomplished?

So far my only thought is detect when the pm.response looks like
…but I’d like to detect between each error specifically.