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}`);
620
+
Logger.logAlert(`Unable to get database size. getDatabaseSize error: ${dbSizeError}. Original error: ${error}`);
621
621
});
622
622
}
623
623
@@ -634,7 +634,7 @@ function retryOperation<TMethod extends RetriableOnyxOperation>(error: Error, on
634
634
Logger.logInfo(`Failed to save to storage. Error: ${error}. onyxMethod: ${onyxMethod.name}. retryAttempt: ${currentRetryAttempt}/${MAX_STORAGE_OPERATION_RETRY_ATTEMPTS}`);
635
635
636
636
if(error&&Str.startsWith(error.message,"Failed to execute 'put' on 'IDBObjectStore'")){
637
-
Logger.logAlert('Attempted to set invalid data set in Onyx. Please ensure all data is serializable.');
637
+
Logger.logAlert(`Attempted to set invalid data set in Onyx. Please ensure all data is serializable. Error: ${error}`);
638
638
throwerror;
639
639
}
640
640
@@ -658,13 +658,13 @@ function retryOperation<TMethod extends RetriableOnyxOperation>(error: Error, on
658
658
// If we have no acceptable keys to remove then we are possibly trying to save mission critical data. If this is the case,
659
659
// 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
660
660
// will allow this write to be skipped.
661
-
Logger.logAlert('Out of storage. But found no acceptable keys to remove.');
662
-
returnreportStorageQuota();
661
+
Logger.logAlert(`Out of storage. But found no acceptable keys to remove. Error: ${error}`);
662
+
returnreportStorageQuota(error);
663
663
}
664
664
665
665
// Remove the least recently accessed key and retry.
666
-
Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying.`);
667
-
reportStorageQuota();
666
+
Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying. Error: ${error}`);
667
+
reportStorageQuota(error);
668
668
669
669
// @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