Don't throw exception on cached data

This commit is contained in:
Yegor Vialov 2020-05-01 14:42:45 +00:00
parent 58842d1ebb
commit e3e1fa3499

View File

@ -146,7 +146,6 @@ class HomeAssistant {
_parseConfig(data);
} catch (e, stacktrace) {
Logger.e('Error gettong config from cache: $e', stacktrace: stacktrace);
throw HACException("Error getting config: $e");
}
} else {
await ConnectionManager().sendSocketMessage(type: "get_config").then((data) => _parseConfig(data)).catchError((e) {
@ -167,7 +166,6 @@ class HomeAssistant {
_parseStates(data);
} catch (e, stacktrace) {
Logger.e('Error getting cached states: $e', stacktrace: stacktrace);
throw HACException("Error getting states: $e");
}
} else {
await ConnectionManager().sendSocketMessage(type: "get_states").then(