Closed KnicKnic closed 5 years ago
Currently the code does not complete callbacks if there is an http error. The callbacks allow for setting an error code instead of null. This would then give an understanding to the user that they are receiving a bad value and not the current one.
You can see valid way of returning error codes in the sample. https://github.com/nfarina/homebridge/blob/6500912f54a70ff479e63e2b72760ab589fa558a/example-plugins/homebridge-lockitron/index.js#L75
Due to results getting cached, this would mean that errors should also get cached. Also this will fix returning uninitialized data.
Closed due to merger of https://github.com/Nicnl/homebridge-minimal-http-blinds/pull/10
Currently the code does not complete callbacks if there is an http error. The callbacks allow for setting an error code instead of null. This would then give an understanding to the user that they are receiving a bad value and not the current one.
You can see valid way of returning error codes in the sample. https://github.com/nfarina/homebridge/blob/6500912f54a70ff479e63e2b72760ab589fa558a/example-plugins/homebridge-lockitron/index.js#L75
Due to results getting cached, this would mean that errors should also get cached. Also this will fix returning uninitialized data.