Internal error in error handling logic
Got a TypeError inside internal error handling code of the library today.
webpack://handler/node_modules/gocardless-nodejs/errors.js:29 const { statusCode, body: { error: { type, errors }, }, } = response; ^ TypeError: Cannot read property 'type' of undefined at Function.buildFromResponse (/var/task/dist/lambda.js:11700:46) -> webpack://handler/node_modules/gocardless-nodejs/errors.js:29:45 at Api.request (/var/task/dist/lambda.js:3748:55) -> webpack://handler/node_modules/gocardless-nodejs/api/api.js:79:1 at runMicrotasks (
) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async PaymentService.create (/var/task/dist/lambda.js:13225:26) -> webpack://handler/node_modules/gocardless-nodejs/services/paymentService.js:21:1
Same here, got an error this morning in production. This is bad
TypeError: Cannot read property 'type' of undefined
at Function.buildFromResponse (/var/task/node_modules/src/errors.ts:63:18)
at Api.request (/var/task/node_modules/src/api/api.ts:121:47)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at RedirectFlowService.create (/var/task/node_modules/src/services/redirectFlowService.ts:92:22)
This is happening a lot recently on our production code, any idea where this is coming from or how to handle it ?
Hi. Is there any update to this issue as we've put up with production errors for a very long time which could possibly hide real errors?