added try-catch to config fetch

This commit is contained in:
Vadim 2024-01-15 23:03:06 +01:00
parent c53fecd9f4
commit 45186b9430

View file

@ -52,9 +52,15 @@ class RemoteConfigService implements IRemoteConfigService {
@override @override
Future<void> fetchConfig() async { Future<void> fetchConfig() async {
try {
// https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667 // https://github.com/firebase/flutterfire/issues/6196#issuecomment-927751667
await Future.delayed(const Duration(seconds: 1)); await Future.delayed(const Duration(seconds: 1));
await FirebaseRemoteConfig.instance.fetch(); await FirebaseRemoteConfig.instance.fetch();
} on FirebaseException catch (e) {
_logError('Firebase exception during Firebase Remote Config fetch: $e');
} catch (e) {
_logError('Error during Firebase Remote Config fetch: $e');
}
} }
@override @override