team-telnyx / telnyx-node

Node SDK for the Telnyx API
https://developers.telnyx.com/docs/api/v2/overview
MIT License
54 stars 20 forks source link

autoPagingEach example not working for faxes #169

Open mathsnunes opened 7 months ago

mathsnunes commented 7 months ago

Here is documentation that I'm trying to follow with:

await telnyx .getClient() .faxes.list() .autoPagingEach(async (fax) => { console.log(fax); });

However, when it gets to the autoPagingEach, I get the following error:

{ "errorMessage": "Unexpected: Telnyx API response does not have a well-formeddataarray.", "errorType": "Error", "stackTrace": [ "Error: Unexpected: Telnyx API response does not have a well-formeddataarray.", " at iterate (..../fax-scheduler.js:243147:17)", " at process.processTicksAndRejections (node:internal/process/task_queues:95:5)" ] }

Node version is: v20.11.0

It seems from the documentation, but clearly, something is not happy.

Please advise.