diff --git a/package.json b/package.json index 5e58556..af7fbda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wyze-api", - "version": "1.1.4", + "version": "1.1.5", "description": "An unoficial API wrapper for Wyze products.", "homepage": "https://github.com/jfarmer08/wyze-api", "main": "./src/index.js", diff --git a/src/index.js b/src/index.js index 722b0f1..7fc2fec 100644 --- a/src/index.js +++ b/src/index.js @@ -145,7 +145,7 @@ module.exports = class WyzeAPI { throw e; } - if (result.data.code != 1) { + if (result.data.code && result.data.code != 1) { this.log.debug(`Potentially recoverable error during request, '${result.data.msg}'`) throw new Error("Potentially recoverable error during request"); }