Node could not resolve the requested host before opening the connection. Diagnose the hostname and the resolver available to the running process instead of treating this as a refused port or an HTTP response.
A host configuration contains a typo, unresolved variable, or an entire URL where a hostname is expected.
A private service name is unavailable outside its container network or private DNS environment.
The runtime environment has a resolver or network configuration problem.
How to fix it
Inspect the error's hostname without exposing credentials. In APIs with a hostname option, pass only the hostname; keep scheme, port, and path in their appropriate fields or use a parsed URL.
Test name resolution from the same machine or container as the application. A successful lookup on your laptop does not establish that a CI runner can resolve the name.
For private services, verify the service name, network membership, and required private resolver. Do not replace private DNS with a public resolver or hard-code a transient IP as a general fix.
If a known-good hostname still fails, inspect environment resolver configuration and resource limits. Node's lookup errors do not always prove that the domain itself is nonexistent.