Closed gjniewenhuijse closed 8 years ago
Sorry, what is it that you reporting here?
Is it that you managed to generate an error and you fixed it by adding a fail to the promise chain, or something else?
You don't provide me anything to go on here, can you please elaborate and give me an example of the code you are calling that generates the error?
/usr/local/lib/node_modules/homebridge-philipshue/node_modules/node-hue-api/node_modules/q/q.js:126 throw e; ^
Error: socket hang up at createHangUpError (_http_client.js:203:15) at Socket.socketOnEnd (_http_client.js:288:23) at emitNone (events.js:72:20) at Socket.emit (events.js:166:7) at endReadableNT (_stream_readable.js:903:12) at doNTCallback2 (node.js:439:9) at process._tickCallback (node.js:353:17)
I may have found a solution for this.
For the node-hue-api you need to have error handling like this: var displayError = function(err) { console.error(err); }; api.setLightState(8, hueState) .then() .fail(displayError) .done();