[Lockitron] Create an Error if necessary

This commit is contained in:
Nick Farina
2015-09-14 07:48:42 -07:00
parent bb39f5f73e
commit adbe116a5a

View File

@@ -51,7 +51,7 @@ LockitronAccessory.prototype.setState = function(state, callback) {
}
else {
this.log("Error '%s' setting lock state. Response: %s", err, body);
callback(err);
callback(err || new Error("Error setting lock state."));
}
}.bind(this));
},