Error handling improvements

This commit is contained in:
Yegor Vialov
2020-05-01 16:24:13 +00:00
parent 7a0ce93cfd
commit 46ca1948e2
8 changed files with 24 additions and 25 deletions

View File

@ -56,7 +56,7 @@ class MobileAppIntegrationManager {
});
}).catchError((e) {
completer.complete();
Logger.e("Error registering the app: ${e.toString()}");
Logger.e("Error registering the app: $e");
});
return completer.future;
} else {
@ -98,10 +98,10 @@ class MobileAppIntegrationManager {
completer.complete();
}).catchError((e) {
if (e is http.Response && e.statusCode == 410) {
Logger.e("MobileApp integration was removed");
Logger.e("MobileApp integration was removed", skipCrashlytics: true);
_askToRegisterApp();
} else {
Logger.e("Error updating app registration: ${e.toString()}");
Logger.e("Error updating app registration: $e");
eventBus.fire(ShowPopupDialogEvent(
title: "App integration is not working properly",
body: "Something wrong with HA Client integration on your Home Assistant server. Please report this issue.",