Intermitten Response

The API is responding sometimes and it errors out after and then it responds
the error looks like the following:
AxiosError: Request failed with status code 403\n at settle (/workspace/node_modules/axios/dist/node/axios.cjs:1970:12)\n at IncomingMessage.handleStreamEnd (/workspace/node_modules/axios/dist/node/axios.cjs:3069:11)\n at IncomingMessage.emit (node:events:529:35)\n at IncomingMessage.emit (node:domain:552:15)\n at endReadableNT (node:internal/streams/readable:1400:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {\n code: ‘ERR_BAD_REQUEST’,\n config: {\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n`

We have just upgraded node js from v16.13.1 to v18.8.8 and the axios package version is 0.27.2