Axios error on fly.io but not on local machine

My code works fine on my local machine and it was working before on fly.io but now I keep getting this error on fly.io when I view the app logs because i wanted to redeploy and I didn’t make any changes to the code. However, my program works fine on my local machine.

2022-09-16T22:24:00Z app[df0bca05] dfw [info]node:internal/process/promises:288
2022-09-16T22:24:00Z app[df0bca05] dfw [info] triggerUncaughtException(err, true /* fromPromise */);
2022-09-16T22:24:00Z app[df0bca05] dfw [info] ^
2022-09-16T22:24:00Z app[df0bca05] dfw [info][UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason “AxiosError: Request failed with status code 400”.] {
2022-09-16T22:24:00Z app[df0bca05] dfw [info] code: ‘ERR_UNHANDLED_REJECTION’
2022-09-16T22:24:00Z app[df0bca05] dfw [info]}

Strange. Hard to debug based on that information alone, however my total guess would be that whatever data you are sending using axios changed. And so a request that was previously working now doesn’t. As that seems to be the variable: if you are using the same version of axios, and the request URL (such as an external API) is the same, it would suggest the data is the issue. A 400 code generally means the data you are sending it is invalid or malformed (unlike say a 403 or 500 error, which have their own meanings). That could be caused by many different things. It would be a case of logging what is being sent and replicating that same request.

And ideally handling the error correctly too, within a try/catch. To stop it complaining about it not being handled.