Remove error log from RNFirebaseRemoteConfig

Leave it up to the consumer of the library to handle any errors instead of forcing a red error screen. In case the app is offline, it is perfectly fine to get a FIRRemoteConfigErrorInternalError error.
This commit is contained in:
skovhus 2018-02-15 19:07:15 +01:00
parent 7be16a4429
commit 1623f389b8
1 changed files with 0 additions and 2 deletions

View File

@ -49,7 +49,6 @@ RCT_EXPORT_METHOD(fetch:
(RCTPromiseRejectBlock) reject) {
[[FIRRemoteConfig remoteConfig] fetchWithCompletionHandler:^(FIRRemoteConfigFetchStatus status, NSError *__nullable error) {
if (error) {
RCTLogError(@"\nError: %@", RCTJSErrorFromNSError(error));
reject(convertFIRRemoteConfigFetchStatusToNSString(status), error.localizedDescription, error);
} else {
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));
@ -64,7 +63,6 @@ RCT_EXPORT_METHOD(fetchWithExpirationDuration:
rejecter:(RCTPromiseRejectBlock)reject) {
[[FIRRemoteConfig remoteConfig] fetchWithExpirationDuration:expirationDuration.doubleValue completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *__nullable error) {
if (error) {
RCTLogError(@"\nError: %@", RCTJSErrorFromNSError(error));
reject(convertFIRRemoteConfigFetchStatusToNSString(status), error.localizedDescription, error);
} else {
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));