Skip to content

Commit

Permalink
Merge pull request #11 from jfarmer08/fix_issue9-2
Browse files Browse the repository at this point in the history
Handles comments from #9
  • Loading branch information
jfarmer08 authored Feb 13, 2024
2 parents 1a1e2ac + b0e258d commit 465c5bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Releases

### v1.1.5
- Adds check if code is not in the message

### v1.1.4
- Adds a check, log message, and refresh atttempt if the code of the response does not equal 1

Expand Down
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.4",
"version": "1.1.5",
"description": "An unoficial API wrapper for Wyze products.",
"homepage": "https://github.com/jfarmer08/wyze-api",
"main": "./src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 465c5bd

Please sign in to comment.