Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When there is a error on the endpoint of the http status it will break homebridge #84

Open
bgoncal opened this issue Mar 9, 2018 · 1 comment

Comments

@bgoncal
Copy link

bgoncal commented Mar 9, 2018

If there is for some reason an error with the status endpoint like the url is not available or is not returning what is expected, the plugin crash the homebridge, this is a really really terrible situation

@colincameron
Copy link

I'm having the same issue. Here's the error log:

[11/18/2018, 6:48:08 AM] [Dining Table Light] HTTP get power function failed: read ECONNRESET
/opt/node/lib/node_modules/homebridge-http/index.js:45
		                callback(error);
		                ^

ReferenceError: callback is not defined
    at /opt/node/lib/node_modules/homebridge-http/index.js:45:19
    at Request._callback (/opt/node/lib/node_modules/homebridge-http/index.js:115:4)
    at self.callback (/opt/node/lib/node_modules/homebridge-http/node_modules/request/request.js:185:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (/opt/node/lib/node_modules/homebridge-http/node_modules/request/request.js:881:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)

This was fixed in #61, but when installing from NPM, an old version is downloaded.

Is there any way to have the package in NPM updated? It's showing as not having been changed in 3 years: https://www.npmjs.com/package/homebridge-http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants