Closed carlosLMZarego closed 11 months ago
Hi @carlosLMZarego, Please find a sample instance of 400 errors. Below are the steps I did to generate this error
RestException [Error]: Invalid business country at success (/Users/asabu/di/github/twilio-node/node_modules/twilio/lib/base/Version.js:79:23) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 400, code: 400, moreInfo: 'https://www.twilio.com/docs/errors/400', details: undefined }
Now change business country to "US" and retry, to get another 422 error RestException [Error]: Number not found in Inventory at success (/Users/asabu/di/github/twilio-node/node_modules/twilio/lib/base/Version.js:79:23) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { status: 422, code: 30436, moreInfo: 'https://www.twilio.com/docs/errors/30436', details: undefined } Also removing any of the fields will give a 400 error saying this field is necessary Hope this helps!
Issue Summary
Hello I need to handle 400-500 errors in my project but I'm not unable to reproduce one of these in order to check the error structure, would you provide me a sample about the fields/properties that these return?...or even better if these return a custom error type could you indicate me what is this? thank you