Axios Timeout Error Intermittently with WhatsApp Cloud API
1

I'm using the WhatsApp Cloud API to send messages, and I’m intermittently receiving a timeout error from Axios. The timeout is set to 10,000ms, but sometimes requests still fail to complete within this limit. This issue doesn’t occur every time,

: timeout of 10000ms exceeded
    at RedirectableRequest.handleRequestTimeout (/var/task/node_modules/axios/dist/node/axios.cjs:3143:16)
    at RedirectableRequest.emit (node:events:519:28)
    at Timeout.<anonymous> (/var/task/node_modules/follow-redirects/index.js:210:12)
    ...
    at Axios.request (/var/task/node_modules/axios/dist/node/axios.cjs:4224:41)
    at async userSendWhatsApp (/var/task/cronJobs/jobs.js:643:17)
    ...
code: 'ECONNABORTED',
config: {
    url: 'https://graph.facebook.com/v20.0/**************/messages',
    timeout: 10000,
    ...
}

Environment:

API: WhatsApp Cloud API
Library: Axios
Timeout Config: 10,000ms
Ajeesh
Asked about 2 months ago