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

`ENOMEM` error on `telnyx.messages.create()` #73

Closed MichalLytek closed 1 year ago

MichalLytek commented 3 years ago

I recently encountered such error when called ENOMEM.

Error: spawn ENOMEM
  at ChildProcess.spawn (internal/child_process.js:403:11)
  at spawn (child_process.js:577:9)
  at Object.execFile (child_process.js:248:17)
  at exec (child_process.js:166:25)
  at Telnyx.getClientUserAgentSeeded (/var/task/src/handlers/worker.js:74655:5)
  at Telnyx.getClientUserAgent (/var/task/src/handlers/worker.js:74644:10)
  at makeRequestWithData (/var/task/src/handlers/worker.js:5416:20)
  at Constructor._request (/var/task/src/handlers/worker.js:5434:7)
  at /var/task/src/handlers/worker.js:89598:10
  at new Promise (<anonymous>)

I think it would be nice to try-catch the exec call in order to report a more developer-friendly error message: https://github.com/team-telnyx/telnyx-node/blob/master/lib/telnyx.js#L248-L266

"telnyx": "^1.10.2", Node 14.x

ADandyGuyInSpace commented 1 year ago

This had to do with a library dumping hashes to requests that were empty, this should be resolved in the newest update.

Feel free to open a new issue if this behavior is still continuing for you.