Some of the messages fail unexpectedly
1

I am seeing weird behavior. I have a series of messages to be sent. some messages are getting sent properly but some are failing. Below is the error text. can someone please help me understand the issue?

AxiosError: Request failed with status code 400 at settle (E:\dev\gitaforlife\gfl_whatsapp\node_modules\axios\lib\core\settle.js:19:12)

},
method: 'post',
url: 'https://graph.facebook.com/v19.0/334075066447579/messages',
data: `{"messaging_product":"whatsapp","recipient_type":"individual","to":"919503222919","type":"interactive","interactive":{"type":"button","header":{"type":"text","text":"✡️✡️✡️✡️✡️✡️✡️✡️✡️\\n\\nLessons in Team Dynamics and Leadership\\n\\n✡️✡️✡️✡️✡️✡️✡️✡️✡️"},"body":{"text":"*Verse Br                 reakdown* 📚\\nThis verse lists the strong warriors on Duryodhana's side: Bhishma, Karna, Kripa, Ashvatthama, Vikarana, and Bhurishrava. Each name highlights their unique skills and strengths in battle. 🏹\\n\\n-*Explanation in Practical Terms* 🤔\\nWho are these characters? 🤔\\nBhishma: elder statesman and formidable warrior 🙏\\nKarna: great archer and warrior loyal to Duryodhana 🏹\\nKripa: accomplished warrior and teacher, strategic thinker 📊\\nAshvatthama: son of Drona, exceptional skills in warfare 💪\\nVikarana: son of Dhritarashtra, involved in the battle 👊\\nSomadatta's son (Bhurishrava): another formidable warrior 💥\\n\\n-*Significance of Mentioning Them Together* 🤝\\nThis list shows Duryodhana's confidence in his team's skills and integrity. It's a strategic move to boost morale and assure his soldiers of their collective strength 💪\\n\\n-*Application in Modern Life* 💼\\nThis verse teaches us the importance of recognizing and utilizing the strengths of our team members. Whether in school projects, workplaces, or personal endeavors, having reliable and skilled individuals by your side is a valuable asset 🤝. It's all about strategic planning, confidence in adversity, and respecting experience and prowess! 💯"},"footer":{"text":"Click on the button below to get the next part."},"action":{"buttons":[{"type":"reply","reply":{"id":"UNIQUE_BUTTON_ID_1","title":"Next Part"}}]}}}`

}, request: ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: '1774', _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'graph.facebook.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 9, connecting: false, _hadError: false, _parent: null, _host: 'graph.facebook.com', _closeAfterHandlingError: false, _readableState: [ReadableState], _writableState: [WritableState], allowHalfOpen: false, _maxListeners: undefined, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, timeout: 5000, parser: null, _httpMessage: null, [Symbol(alpncallback)]: null, [Symbol(res)]: [TLSWrap], [Symbol(verified)]: true, [Symbol(pendingSession)]: null, [Symbol(async_id_symbol)]: -1, [Symbol(kHandle)]: [TLSWrap], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: 5000, _idlePrev: [TimersList], _idleNext: [TimersList], _idleStart: 28832, _onTimeout: [Function: bound ], _timerArgs: undefined, _repeat: null, _destroyed: false, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 663, [Symbol(triggerId)]: 661 }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 1, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0,

  'Content-Length: 1774\r\n' +
  'Accept-Encoding: gzip, compress, deflate, br\r\n' +
  'Host: graph.facebook.com\r\n' +
  'Connection: keep-alive\r\n' +
  '\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: Agent {
  _events: [Object: null prototype],
  _eventsCount: 2,
  _maxListeners: undefined,
  defaultPort: 443,
  protocol: 'https:',
  options: [Object: null prototype],
  requests: [Object: null prototype] {},
  sockets: [Object: null prototype] {},
  freeSockets: [Object: null prototype],
  keepAliveMsecs: 1000,
  keepAlive: true,
  maxSockets: Infinity,
  maxFreeSockets: 256,
  scheduling: 'lifo',
  maxTotalSockets: Infinity,
  totalSocketCount: 1,
  maxCachedSessions: 100,
  _sessionCache: [Object],
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/v19.0/334075066447579/messages',
_ended: true,
res: IncomingMessage {
  _events: [Object],
  _readableState: [ReadableState],
  _maxListeners: undefined,
  socket: null,
  httpVersionMajor: 1,
  httpVersionMinor: 1,
  httpVersion: '1.1',
  complete: true,
  rawHeaders: [Array],
  rawTrailers: [],
  joinDuplicateHeaders: undefined,
  aborted: false,
  upgrade: false,
  url: '',
  method: null,
  statusCode: 400,
  statusMessage: 'Bad Request',
  client: [TLSSocket],
  _consuming: true,
  _dumped: false,
  req: [Circular *1],
  _eventsCount: 4,
  responseUrl: 'https://graph.facebook.com/v19.0/334075066447579/messages',
  redirects: [],
  [Symbol(shapeMode)]: true,
  [Symbol(kCapture)]: false,
  [Symbol(kHeaders)]: [Object],
  [Symbol(kHeadersCount)]: 44,
  [Symbol(kTrailers)]: null,
  [Symbol(kTrailersCount)]: 0
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'graph.facebook.com',
protocol: 'https:',
_redirectable: Writable {
  _events: [Object],
  _writableState: [WritableState],
  _maxListeners: undefined,
  _options: [Object],
  _ended: true,
  _ending: true,
  _redirectCount: 0,
  _redirects: [],
  _requestBodyLength: 1774,
  _requestBodyBuffers: [],
  _eventsCount: 3,
  _onNativeResponse: [Function (anonymous)],
  _currentRequest: [Circular *1],
  _currentUrl: 'https://graph.facebook.com/v19.0/334075066447579/messages',
  [Symbol(shapeMode)]: true,
  [Symbol(kCapture)]: false
},
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
  accept: [Array],
  'content-type': [Array],
  authorization: [Array],
  'user-agent': [Array],
  'content-length': [Array],
  'accept-encoding': [Array],
  host: [Array]
},
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null

}, response: { status: 400, statusText: 'Bad Request', headers: AxiosHeaders { vary: 'Origin, Accept-Encoding', 'x-business-use-case-usage': '{"250837611455689":[{"type":"whatsapp","call_count":1,"total_cputime":1,"total_time":1,"estimated_time_to_regain_access":0}]}', 'content-type': 'application/json', 'www-authenticate': 'OAuth "Facebook Platform" "invalid_request" "(#131009) Parameter value is not valid"', 'access-control-allow-origin': '*', 'facebook-api-version': 'v19.0', 'strict-transport-security': 'max-age=15552000; preload', pragma: 'no-cache', 'cache-control': 'no-store', expires: 'Sat, 01 Jan 2000 00:00:00 GMT', 'x-fb-request-id': 'ATRpuGyYOw8FWRHXVzFigP2', 'x-fb-trace-id': 'CbYjPcxS7f4', 'x-fb-rev': '1013882807', 'x-fb-debug': '4ebtsnxG7tA30MmYV8m2o6wlyh6lNAqwHZcylMDSRcRq1zCA4imSHYwCGpcIu5yGXySeh1f1A8zUOrnCRXzKvw==', date: 'Fri, 31 May 2024 06:12:01 GMT', 'proxy-status': 'http_request_error; e_proxy="AcKHZ7-tfrjxIlM2PdZSOWz8vG1WxIoS48oohjgF_NdPk2EvkAJZzPlI3fPShHJgXaQO7mQdiNKfKLzE54DM"; e_fb_binaryversion="AcIApgUrhcvMS8O5qRmsr26in6iaOH-UhDvHJ3fRj3yZUlxn02-qoseC5oS2tx9MtQVlcuiIuVc7quiY9HtjRWvKWntShVw-nb4"; e_fb_httpversion="AcJdTCl5frvJczKqGrlSCv7knCPhRVoNmSkENMHHS8MioxsExtMLqLN8N3xw"; e_fb_responsebytes="AcJH-M7uFIDNG_945PgwKRI4SjtjZTtVmQfugn74WkjlueUHyRw3zaZNOW2W"; e_fb_requesttime="AcLC55EVyHKiB7hvunRBe0g789WK3KSXt_8C0dG-XG3wl37rXgT5C_3yrSCeLT8lJRYRJCllBg"; e_fb_requesthandler="AcK3fgSO0n4fjUM_9UgDzuEM13Fa8SsNhq6otr4Ibyj1HyOGeExrb0EHbi3Wwpbmtc2Vpq0tVeY"; e_fb_hostheader="AcJhR2D-1EwYwcJLr8QxX7dPw4o-SpcwfWNp0PJN2fsh0VDn_lPjUbuJyseM-DmwrUpLg0cy-dVgUTJn"; e_fb_requestsequencenumber="AcLZhDzAVj3f2h_9xRrAZ854v4iewBKMAkjYMbVmyKlCzPmsidIngheYqEhw4g"; e_upip="AcLLF0HgyFxZEn7eaboMOSPXvyA9mv-cN_1T_TVWVfLEoqu1S227iBMa6OFQgr0QqWfBtTfHsu79q7t5ryItMazT0LlghjHMNj4"; e_fb_builduser="AcIy10eefDFh-FXCceaoI-8gpHNLFbMeSJtOOBvRyRF3m8tKyqDelZqnM32Jz-F4v7I"; e_fb_vipport="AcIdnoJM7VqbNSdeLuP2j2nk-nIj1wPJCSVAD2npa9f1YPeNF8TCCgc6GCMi"; e_clientaddr="AcITOdk7WAjN2kk8hS0-yLaQGb5tCrjNYhw2rFnIw3IKNP7dyxQ8mfnjlrfTsVGAAWhj4u1pMwNb5yMKOkfZNNshKo6vh9kRRRRmzS2KrvngtJ631g"; e_fb_vipaddr="AcJRUTrcsK863r_UoJA1aXtk9bDqFrmRWF8ZDwZpy9OfFm7xokKftqIfReWTFF0yrdFKH7_xJvvGBNNTTo3EIT5TdHg3RaDP3Q"; e_fb_configversion="AcKaOwIWSAg70DQU-chROh2chyO0GCZ0FsTLVediIXmHZ1N4y3XCN1wAZf9u-sVzcXDQg_aKuFJzF6i2xn4lObRO4vhWbCySiVA", http_request_error; e_proxy="AcKQGknPY262Wpy0xm9CKY57RTe4JhTTcdNvevyQljZ2hGYOqptkeUpPnGdTOhobABaqnq30DsEv5Jc"; e_fb_binaryversion="AcJjH5IvOj1xXqLZ2BOrUCuAZfwxyWh7ACgeXQaMsQPeflcX6rNvhbS3CZP5uaTseokq_WfnQEGaWf_PNTsPkLiXxL-_aSZ__ZU"; e_fb_httpversion="AcK5ZAVPZ5_rWakJRIA8CM7zcKnfkxof8uMuOjEOQcdCjHW4CGLJvwII_9Gq"; e_fb_responsebytes="AcJdrxoN3iHGhtpy8UIFyC5b2u0CweS6CjMtNGjE34J-h6KxKwkRXj2QFvmV"; e_fb_requesttime="AcL_sLtLS4ELNLO_6r2yrJz7Qb3N_xx1pHyedhJcYY8_Nd57yQvnB6o8zdCoR9IZ3BsqQGH6Cg"; e_fb_requesthandler="AcLD7KvapFHwqNzh5qCMWFdoEW7G-WSMqG8F6GOIb4dCcZX1FewGNCLLZ4CQvU1YCnRMsYbwOZA"; e_fb_hostheader="AcIezQuEPTJWclFUifce834dqRZVGiMBJKpsmniOzawVScGKl8dFt-Uo39gHvt0fgqCI8Yx43Tpw5dlK"; e_fb_requestsequencenumber="AcLeS6ak1rHArrt2-4_NsClNV4I3qtrBYlyY8NmzWpb4X6QMccEcSve3CA"; e_upip="AcIvE-pXhfeYJWRX7c0NwtL0kt4um13VNc6u8dJrhjXRiVzjCiigN4AxawG5ZRDvbvr_XsT3chTzOi9PTI56Pz7vlkLuyhAvqQ"; e_fb_builduser="AcI5s9n79DPp1GMDnLxhxEe5qaZnOlcLPOV4lwJ3wVRXpMSr2VbXHPBvJzI7jcP6nfY"; e_fb_vipport="AcKEI3COgWLatK-9GqLU_Ke2PfxrRAvkm-aLHVd8hJOzMS7B5ywNFz_mD3Vt"; e_clientaddr="AcIL6mH5HejlXkiVfAMVJwVnWIg0yKVUzH2an5wNjO0QjhpNyDXP_ILZhgDZCfmKBJdEqXUkPTLLQIiKqM4"; e_fb_vipaddr="AcKdruicvR0wrR8_ti2F2PzopboxSAtvXSzFFWRBUOZr0NLeoP9297egtwr3WsuNENQu090OWw"; e_fb_configversion="AcIm2yxELdw8KdhIOXYRgsPhZLZuavadBHMYN1Lhgh3lOwgjx8QfGigytWbg5g"', 'x-fb-connection-quality': 'EXCELLENT; q=0.9, rtt=11, rtx=0, c=10, mss=1392, tbw=3404, tp=-1, tpl=-1, uplat=306, ullat=0', 'alt-svc': 'h3=":443"; ma=86400', connection: 'keep-alive', 'content-length': '194' }, config: { transitional: [Object], adapter: [Array], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [AxiosHeaders], method: 'post', url: 'https://graph.facebook.com/v19.0/334075066447579/messages', data: {"messaging_product":"whatsapp","recipient_type":"individual","to":"919503222919","type":"interactive","interactive":{"type":"button","header":{"type":"text","text":"✡️✡️✡️✡️✡️✡️✡️✡️✡️\\n\\nLessons in Team Dynamics and Leadership\\n\\n✡️✡️✡️✡️✡️✡️✡️✡️✡️"},"body":{"text":"*Verse Breakdown* 📚\\nThis verse lists the strong warriors on Duryodhana's side: Bhishma, Karna, Kripa, Ashvatthama, Vikarana, and Bhurishrava. Each name highlights their unique skills and strengths in battle. 🏹\\n\\n-*Explanation in Practical Terms* 🤔\\nWho are these characters? 🤔\\nBhishma: elder statesman and formidable warrior 🙏\\nKarna: great archer and warrior loyal to Duryodhana 🏹\\nKripa: accomplished warrior and teacher, strategic thinker 📊\\nAshvatthama: son of Drona, exceptional skills in warfare 💪\\nVikarana: son of Dhritarashtra, involved in the battle 👊\\nSomadatta's son (Bhurishrava): another formidable warrior 💥\\n\\n-*Significance of Mentioning Them Together* 🤝\\nThis list shows Duryodhana's confidence in his team's skills and integrity. It's a strategic move to boost morale and assure his soldiers of their collective strength 💪\\n\\n-*Application in Modern Life* 💼\\nThis verse teaches us the importance of recognizing and utilizing the strengths of our team members. Whether in school projects, workplaces, or personal endeavors, having reliable and skilled individuals by your side is a valuable asset 🤝. It's all about strategic planning, confidence in adversity, and respecting experience and prowess! 💯"},"footer":{"text":"Click on the button below to get the next part."},"action":{"buttons":[{"type":"reply","reply":{"id":"UNIQUE_BUTTON_ID_1","title":"Next Part"}}]}}} }, request: ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: '1774', _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [TLSSocket], _header: 'POST /v19.0/334075066447579/messages HTTP/1.1\r\n' +

    'User-Agent: axios/1.4.0\r\n' +
    'Content-Length: 1774\r\n' +
    'Accept-Encoding: gzip, compress, deflate, br\r\n' +
    'Host: graph.facebook.com\r\n' +
    'Connection: keep-alive\r\n' +
    '\r\n',
  _keepAliveTimeout: 0,
  _onPendingData: [Function: nop],
  agent: [Agent],
  socketPath: undefined,
  method: 'POST',
  maxHeaderSize: undefined,
  insecureHTTPParser: undefined,
  joinDuplicateHeaders: undefined,
  path: '/v19.0/334075066447579/messages',
  _ended: true,
  res: [IncomingMessage],
  aborted: false,
  timeoutCb: null,
  upgradeOrConnect: false,
  parser: null,
  maxHeadersCount: null,
  reusedSocket: false,
  host: 'graph.facebook.com',
  protocol: 'https:',
  _redirectable: [Writable],
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype],
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null
},
data: { error: [Object] }

} }

Sandeep
Asked about 7 months ago