gocardless-nodejs icon indicating copy to clipboard operation
gocardless-nodejs copied to clipboard

Internal error in error handling logic

Open aharin opened this issue 4 years ago • 3 comments

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

aharin avatar Jul 05 '21 08:07 aharin

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)

sambegin avatar Jun 18 '22 13:06 sambegin

This is happening a lot recently on our production code, any idea where this is coming from or how to handle it ?

HatemSat avatar Aug 21 '23 12:08 HatemSat

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?

michaelkay-wrisk avatar May 14 '24 12:05 michaelkay-wrisk