Error with Stripe 'List invoice items' API call

Hello,

I am trying to use the Stripe ‘List invoice items’ API call - please see my request below:

But when I do this i get the below error:

{“status”:“500”,“message”:“Cannot read properties of undefined (reading ‘list’)”,“stack”:“TypeError: Cannot read properties of undefined (reading ‘list’)\n at App.exports.listInvoiceitems (/opt/node_app/lib/modules/stripe.js:1875:30)\n at App._exec (/opt/node_app/lib/core/app.js:609:57)\n at App._exec (/opt/node_app/lib/core/app.js:576:28)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async App.exec (/opt/node_app/lib/core/app.js:545:9)\n at async App.define (/opt/node_app/lib/core/app.js:527:9)”}

Do you have any idea what is causing this? As far as I can see, all the fields in this API action are optional.

Thanks,

Leo

I believe this is a bug on the wappler side.

To test a possible solution, try modifying the stripe.js file found in /lib/modules.

Change line 1875

  return stripe.invoiceitems.list(options,__extra);

to

  return stripe.invoiceItems.list(options,__extra);

Actually, already reported as bug. I thought this sounded familiar!

Thanks Ken!

I have done that and now get the below error:

{“status”:“500”,“message”:“Action listInvoiceitems doesn’t exist in stripe”,“stack”:“Error: Action listInvoiceitems doesn’t exist in stripe\n at App._exec (/opt/node_app/lib/core/app.js:599:27)\n at App._exec (/opt/node_app/lib/core/app.js:576:28)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async App.exec (/opt/node_app/lib/core/app.js:545:9)\n at async App.define (/opt/node_app/lib/core/app.js:527:9)”}

Should I rename the action?

Thanks

Can’t try this myself right now, but I know when I posted the solution on the bug report it worked, so try changing all occurrences as noted in that original ticket. If that doesn’t work, the team will have to resolve.

1 Like