opentok-node icon indicating copy to clipboard operation
opentok-node copied to clipboard

2.17.0 breaks due to SyntaxError, automatic json parsing in needle

Open borkanee opened this issue 2 years ago • 1 comments

2.17.0 breaks when using listStreams and probably listBroadcasts and stopBroadcast as well,, we have gone back to 2.16.0 in the meantime.

It seems to be related to the switch from request to needle as needle automatically parses json unless options.parse is set to false and as far is I can see it is not set at the moment in version 2.17.0, which leads to JSON.parse() throwing errors. You could either set parse:false on the specific request or simply change the defaults for all request by setting parse_response: false: on the defaults. Read more here: https://github.com/tomas/needle/#overriding-defaults

Another option could be to simply remove the JSON.parse() in the requestCallbacks.

borkanee avatar Oct 31 '23 09:10 borkanee

I created a ticket to Vonage about this.

tapz avatar Nov 29 '23 13:11 tapz

This has been resolved

manchuck avatar Jun 03 '24 14:06 manchuck