Skip to content

Commit

Permalink
0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Dec 20, 2023
1 parent 4b39b8d commit 3bdf727
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
8 changes: 4 additions & 4 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"common": {
"name": "vw-connect",
"version": "0.4.1",
"version": "0.4.2",
"news": {
"0.4.1": {
"en": "Fix Volkswagen App status update",
"de": "Fix für Volkswagen App Status Update"
"0.4.2": {
"en": "Fix Volkswagen App status update and improve logging",
"de": "Fix für Volkswagen App Status Update und Verbesserung der Logging Ausgabe"
},
"0.3.6": {
"en": "Improve trip loading and fix windowheating warning",
Expand Down
26 changes: 14 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class VwWeconnect extends utils.Adapter {
this.hasRemoteLock = false;
this.isFirstLocation = true;
this.lastTripCheck = 0;
this.firstStart = true;

this.statesArray = [
{
Expand Down Expand Up @@ -2814,8 +2815,7 @@ class VwWeconnect extends utils.Adapter {
})
.catch((error) => {
if (error.response && error.response.status >= 500) {
this.log.info("Server not available:" + JSON.stringify(error.response.data));
return;
this.log.info("Server not available:");
}
this.log.error(error);
this.log.error("No shortterm trips found please disable in your settings");
Expand Down Expand Up @@ -2859,8 +2859,7 @@ class VwWeconnect extends utils.Adapter {
})
.catch((error) => {
if (error.response && error.response.status >= 500) {
this.log.info("Server not available:" + JSON.stringify(error.response.data));
return;
this.log.info("Server not available:");
}
this.log.error(error);
this.log.error("No longterm trips found please disable in your settings");
Expand Down Expand Up @@ -2905,8 +2904,7 @@ class VwWeconnect extends utils.Adapter {
})
.catch((error) => {
if (error.response && error.response.status >= 500) {
this.log.info("Server not available:" + JSON.stringify(error.response.data));
return;
this.log.info("Server not available");
}
this.log.error(error);
this.log.error("No shortterm trips found please disable in your settings");
Expand Down Expand Up @@ -2938,8 +2936,7 @@ class VwWeconnect extends utils.Adapter {
})
.catch((error) => {
if (error.response && error.response.status >= 500) {
this.log.info("Server not available:" + JSON.stringify(error.response.data));
return;
this.log.info("Server not available:");
}
if (error.response && error.response.status === 404) {
this.log.info("No last shorterm trips found. Please check if your car supports shortterm trips.");
Expand Down Expand Up @@ -2976,8 +2973,7 @@ class VwWeconnect extends utils.Adapter {
})
.catch((error) => {
if (error.response && error.response.status >= 500) {
this.log.info("Server not available:" + JSON.stringify(error.response.data));
return;
this.log.info("Server not available:");
}
if (error.response && error.response.status === 404) {
this.log.info("No last longterm trips found. Please check if your car supports longterm trips.");
Expand Down Expand Up @@ -3013,8 +3009,7 @@ class VwWeconnect extends utils.Adapter {
})
.catch((error) => {
if (error.response && error.response.status >= 500) {
this.log.info("Server not available:" + JSON.stringify(error.response.data));
return;
this.log.info("Server not available:");
}
if (error.response && error.response.status === 404) {
this.log.info("No last cyclic trips found. Please check if your car supports cyclic trips.");
Expand Down Expand Up @@ -3351,6 +3346,13 @@ class VwWeconnect extends utils.Adapter {
this.log.debug("304 No values updated");
return;
}
if (error.response.status === 403) {
if (this.firstStart) {
this.log.debug(JSON.stringify(error.response.data));
this.firstStart = false;
return;
}
}
if (error.response.status === 412) {
this.log.debug(JSON.stringify(error.response.data));
return;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@
"test:package": "mocha test/package --exit",
"test:unit": "mocha test/unit --exit"
},
"version": "0.4.1"
"version": "0.4.2"
}

0 comments on commit 3bdf727

Please sign in to comment.