diff --git a/index.js b/index.js index 4191a68..96fa716 100644 --- a/index.js +++ b/index.js @@ -273,7 +273,9 @@ class Heatzy { this.token = body.token; this.tokenExpires = body.expire_at; return body.token; - }) + }).catch((error) => { + return error; + }); } getDevices() { @@ -291,4 +293,4 @@ class Heatzy { } } -module.exports = Heatzy; \ No newline at end of file +module.exports = Heatzy;