Skip to content

Commit

Permalink
Merge pull request #10 from jfarmer08/fix_issue9
Browse files Browse the repository at this point in the history
Fixes issue #9
  • Loading branch information
jfarmer08 authored Feb 13, 2024
2 parents ed3e34f + 64658d1 commit 6dc5230
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wyze-api",
"version": "1.1.3",
"version": "1.1.4",
"description": "An unoficial API wrapper for Wyze products.",
"homepage": "https://github.com/jfarmer08/wyze-api",
"main": "./src/index.js",
Expand Down
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ module.exports = class WyzeAPI {

throw e;
}
this.log.debug(result.data.msg);

if (result.data.code != 1) {
this.log.debug(`Potentially recoverable error during request, '${result.data.msg}'`)
throw new Error("Potentially recoverable error during request");
}
return result;
}

Expand Down

0 comments on commit 6dc5230

Please sign in to comment.