pckhib / node-red-contrib-spotify

Node-RED node for Spotify Web API
MIT License
13 stars 16 forks source link

TypeError: Cannot read property 'body' of undefined #21

Open martijndierckx opened 3 years ago

martijndierckx commented 3 years ago

I'm getting this error each night, without any further details Every 5 seconds I'm requesting a getMyCurrentPlaybackState. Which works perfectly, but each night I'm getting this error, making node-red crash.

28 Dec 23:45:17 - [red] Uncaught Exception:
28 Dec 23:45:17 - TypeError: Cannot read property 'body' of undefined
    at _toError (/data/node_modules/spotify-web-api-node/src/http-manager.js:34:23)
    at /data/node_modules/spotify-web-api-node/src/http-manager.js:71:25
    at Request.callback (/data/node_modules/superagent/lib/node/index.js:905:3)
    at ClientRequest.<anonymous> (/data/node_modules/superagent/lib/node/index.js:822:12)
    at ClientRequest.emit (events.js:198:13)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)
    at emitErrorNT (internal/streams/destroy.js:91:8)
martijndierckx commented 3 years ago

thelinmichael/spotify-web-api-node#340