mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-08-01 09:28:33 +00:00
2 fixes as required by issue 185
Solution to a race condition with starting updates and amendment to error message presentation on Webhook ID creation failure. Co-Authored-By: Joseph Abbey <me@josephabbey.dev>
This commit is contained in:
@ -181,8 +181,12 @@ class WebhookManager {
|
||||
// Webhook ID might have been deleted on Home Assistant server and a Lang.String is trying to tell us an error message
|
||||
Settings.unsetWebhookId();
|
||||
Settings.unsetIsSensorsLevelEnabled();
|
||||
// ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + data.toString());
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String);
|
||||
if (data == null) {
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\nNull data");
|
||||
} else {
|
||||
// All objects have toString()
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.WebhookFailed) as Lang.String + "\n" + data.toString());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user