You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logger.logAlert(`Unable to get database size. Error: ${dbSizeError}`);
757
+
Logger.logAlert(`Unable to get database size. getDatabaseSize error: ${dbSizeError}. Original error: ${error}`);
752
758
});
753
759
}
754
760
@@ -765,7 +771,7 @@ function retryOperation<TMethod extends RetriableOnyxOperation>(error: Error, on
765
771
Logger.logInfo(`Failed to save to storage. Error: ${error}. onyxMethod: ${onyxMethod.name}. retryAttempt: ${currentRetryAttempt}/${MAX_STORAGE_OPERATION_RETRY_ATTEMPTS}`);
766
772
767
773
if(error&&Str.startsWith(error.message,"Failed to execute 'put' on 'IDBObjectStore'")){
768
-
Logger.logAlert('Attempted to set invalid data set in Onyx. Please ensure all data is serializable.');
774
+
Logger.logAlert(`Attempted to set invalid data set in Onyx. Please ensure all data is serializable. Error: ${error}`);
769
775
throwerror;
770
776
}
771
777
@@ -789,13 +795,13 @@ function retryOperation<TMethod extends RetriableOnyxOperation>(error: Error, on
789
795
// If we have no acceptable keys to remove then we are possibly trying to save mission critical data. If this is the case,
790
796
// then we should stop retrying as there is not much the user can do to fix this. Instead of getting them stuck in an infinite loop we
791
797
// will allow this write to be skipped.
792
-
Logger.logAlert('Out of storage. But found no acceptable keys to remove.');
793
-
returnreportStorageQuota();
798
+
Logger.logAlert(`Out of storage. But found no acceptable keys to remove. Error: ${error}`);
799
+
returnreportStorageQuota(error);
794
800
}
795
801
796
802
// Remove the least recently accessed key and retry.
797
-
Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying.`);
798
-
reportStorageQuota();
803
+
Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying. Error: ${error}`);
804
+
reportStorageQuota(error);
799
805
800
806
// @ts-expect-error No overload matches this call.
expect(logAlertSpy).toHaveBeenCalledWith(`Attempted to set invalid data set in Onyx. Please ensure all data is serializable. Error: ${invalidDataError}`);
474
+
});
475
+
476
+
it('should include the error in logs when out of storage with no evictable keys',async()=>{
0 commit comments