node-red-contrib / node-red-contrib-renault-ze

node-red extension to fetch the status from your renault connected car
Apache License 2.0
19 stars 6 forks source link

Nodered reboot when a wrong token is received #104

Open JapieG opened 5 months ago

JapieG commented 5 months ago

Describe the bug When a unexpected token occurs, node-red reboots.

error log nodered:

26 Jan 11:50:01 - [red] Uncaught Exception: 26 Jan 11:50:01 - [error] FetchError: invalid json response body at https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/"LONG CODE"/kamereon/kca/car-adapter/v2/cars/"MYVIN"/battery-status?country=DE reason: Unexpected token < in JSON at position 0 at /data/node_modules/node-fetch/lib/index.js:273:32 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5) 26 Jan 11:50:04 - [info] Welcome to Node-RED

pellenbeck commented 3 weeks ago

I have the same problem.

I do not know if something changed in the API by Renault. In general there a several other services using the same API from Renault. For example https://github.com/evcc-io/evcc/tree/master/vehicle/renault (evcc is a ev loading management). Maybe the maintainer could check if there are other/better ways to handle those problems.