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:
parent
7be16a4429
commit
1623f389b8
|
@ -49,7 +49,6 @@ RCT_EXPORT_METHOD(fetch:
|
||||||
(RCTPromiseRejectBlock) reject) {
|
(RCTPromiseRejectBlock) reject) {
|
||||||
[[FIRRemoteConfig remoteConfig] fetchWithCompletionHandler:^(FIRRemoteConfigFetchStatus status, NSError *__nullable error) {
|
[[FIRRemoteConfig remoteConfig] fetchWithCompletionHandler:^(FIRRemoteConfigFetchStatus status, NSError *__nullable error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
RCTLogError(@"\nError: %@", RCTJSErrorFromNSError(error));
|
|
||||||
reject(convertFIRRemoteConfigFetchStatusToNSString(status), error.localizedDescription, error);
|
reject(convertFIRRemoteConfigFetchStatusToNSString(status), error.localizedDescription, error);
|
||||||
} else {
|
} else {
|
||||||
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));
|
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));
|
||||||
|
@ -64,7 +63,6 @@ RCT_EXPORT_METHOD(fetchWithExpirationDuration:
|
||||||
rejecter:(RCTPromiseRejectBlock)reject) {
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
[[FIRRemoteConfig remoteConfig] fetchWithExpirationDuration:expirationDuration.doubleValue completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *__nullable error) {
|
[[FIRRemoteConfig remoteConfig] fetchWithExpirationDuration:expirationDuration.doubleValue completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *__nullable error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
RCTLogError(@"\nError: %@", RCTJSErrorFromNSError(error));
|
|
||||||
reject(convertFIRRemoteConfigFetchStatusToNSString(status), error.localizedDescription, error);
|
reject(convertFIRRemoteConfigFetchStatusToNSString(status), error.localizedDescription, error);
|
||||||
} else {
|
} else {
|
||||||
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));
|
resolve(convertFIRRemoteConfigFetchStatusToNSString(status));
|
||||||
|
|
Loading…
Reference in New Issue