I am calling an external endpoint using node js' axios library and usually it works, but for some reason sometimes I get this response back:
AxiosError: connect ETIMEDOUT 12.123.12.123:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16) {
port: 443,
address: '12.123.12.123',
syscall: 'connect',
code: 'ETIMEDOUT',
errno: -60,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: httpAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function] },
validateStatus: [Function: validateStatus],
headers: {
Accept: 'application/json, text/plain, */*',
Authorization: 'Basic <AUTH_KEY>',
'User-Agent': 'axios/0.27.2'
},
baseURL: 'https://api.staffology.co.uk',
method: 'get',
url: '/employers',
data: undefined
}
Any idea what can be the reason behind this? There is no timeout set to the axios client, only the baseUrl and the Authorization header.