Skip to content

Commit

Permalink
Better handle homebridge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Feb 21, 2023
1 parent 09fa08b commit 767fc1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/widgets/homebridge/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 767fc1e

Please sign in to comment.