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