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}`);
774
+
Logger.logAlert(`Unable to get database size. Original error: ${error}. getDatabaseSize error: ${dbSizeError}`);
775
775
});
776
776
}
777
777
@@ -788,7 +788,7 @@ function retryOperation<TMethod extends RetriableOnyxOperation>(error: Error, on
788
788
Logger.logInfo(`Failed to save to storage. Error: ${error}. onyxMethod: ${onyxMethod.name}. retryAttempt: ${currentRetryAttempt}/${MAX_STORAGE_OPERATION_RETRY_ATTEMPTS}`);
789
789
790
790
if(error&&Str.startsWith(error.message,"Failed to execute 'put' on 'IDBObjectStore'")){
791
-
Logger.logAlert('Attempted to set invalid data set in Onyx. Please ensure all data is serializable.');
791
+
Logger.logAlert(`Attempted to set invalid data set in Onyx. Please ensure all data is serializable. Error: ${error}`);
792
792
throwerror;
793
793
}
794
794
@@ -812,13 +812,13 @@ function retryOperation<TMethod extends RetriableOnyxOperation>(error: Error, on
812
812
// If we have no acceptable keys to remove then we are possibly trying to save mission critical data. If this is the case,
813
813
// 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
814
814
// will allow this write to be skipped.
815
-
Logger.logAlert('Out of storage. But found no acceptable keys to remove.');
816
-
returnreportStorageQuota();
815
+
Logger.logAlert(`Out of storage. But found no acceptable keys to remove. Error: ${error}`);
816
+
returnreportStorageQuota(error);
817
817
}
818
818
819
819
// Remove the least recently accessed key and retry.
820
-
Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying.`);
821
-
reportStorageQuota();
820
+
Logger.logInfo(`Out of storage. Evicting least recently accessed key (${keyForRemoval}) and retrying. Error: ${error}`);
821
+
reportStorageQuota(error);
822
822
823
823
// @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}`);
406
+
});
407
+
408
+
it('should include the error in logs when out of storage with no evictable keys',async()=>{
0 commit comments