homey-api 3.0.8 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -703,8 +703,8 @@ class HomeyAPIV3 extends HomeyAPI {
|
|
|
703
703
|
});
|
|
704
704
|
})
|
|
705
705
|
.catch(async err => {
|
|
706
|
-
// If token is expired, try to refresh
|
|
707
|
-
if (err.statusCode === 401) {
|
|
706
|
+
// If token is expired, try to refresh, statusCode is for apiVersion 3 and code for apiVersion 2.
|
|
707
|
+
if (err.statusCode === 401 || err.code === 401) {
|
|
708
708
|
this.__debug('Token expired, refreshing...');
|
|
709
709
|
await this.logout();
|
|
710
710
|
await this.login();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homey-api",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "Homey API",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"eslint": "^7.32.0",
|
|
67
67
|
"eslint-config-athom": "^2.1.1",
|
|
68
68
|
"fs-extra": "^10.0.0",
|
|
69
|
-
"homey-api": "^3.0.
|
|
69
|
+
"homey-api": "^3.0.8",
|
|
70
70
|
"http-server": "^0.12.3",
|
|
71
71
|
"jsdoc": "^4.0.2",
|
|
72
72
|
"jsdoc-to-markdown": "^8.0.0",
|