Node.js http.request does not work with [Error: getaddrinfo EADDRINFO]

I have a node.js server that acts like a proxy. It receives requests and redirects them to a web service in another domain by doing http.request.

Request parameters are usually similar to:

{ "host": "some.domain", "port": 443, "path": "/paht/item/id", "method": "POST", "headers": { "Host": "some.domain", "Content-Type": "application/json; charset=utf-8", "Content-Length": 100 } } 

Recently, I noticed that some queries fail with [Error: getaddrinfo EADDRINFO] , but not all of them.

Does anyone know what EADDRINFO means, and what is the alleged reason?

+6
source share
1 answer

EAADRINFO is the type of error that can occur when looking up the IP address of a host name for the case when the IP address cannot be found. Therefore, this probably means here that the value of "some.domain" request cannot be resolved for an IP address.

+13
source

Source: https://habr.com/ru/post/926103/


All Articles