mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 23:38:46 +00:00
Better handle homebridge errors
This commit is contained in:
parent
09fa08b037
commit
767fc1ec39
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ async function apiCall(widget, endpoint, service) {
|
|||
|
||||
if (status !== 200) {
|
||||
logger.error("Error getting data from Homebridge: %s status %d. Data: %s", url, status, data);
|
||||
return { status, contentType, data: null, responseHeaders };
|
||||
}
|
||||
|
||||
return { status, contentType, data: JSON.parse(data.toString()), responseHeaders };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue