Skip to content

Commit 67bd9d4

Browse files
committed
Add comments
1 parent c4d29dc commit 67bd9d4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lib/OnyxUtils.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,18 @@ const METHOD = {
4949
CLEAR: 'clear',
5050
} as const;
5151

52-
const IDB_STORAGE_ERRORS = ['quotaexceedederror'] as const;
53-
const SQL_STORAGE_ERRORS = ['database or disk is full', 'disk I/O error', 'out of memory'] as const;
52+
// IndexedDB errors that indicate storage capacity issues where eviction can help
53+
const IDB_STORAGE_ERRORS = [
54+
'quotaexceedederror', // Browser storage quota exceeded
55+
] as const;
56+
57+
// SQLite errors that indicate storage capacity issues where eviction can help
58+
const SQL_STORAGE_ERRORS = [
59+
'database or disk is full', // Device storage is full
60+
'disk I/O error', // File system I/O failure, often due to insufficient space or corrupted storage
61+
'out of memory', // Insufficient RAM or storage space to complete the operation
62+
] as const;
63+
5464
const STORAGE_ERRORS = [...IDB_STORAGE_ERRORS, ...SQL_STORAGE_ERRORS];
5565

5666
type OnyxMethod = ValueOf<typeof METHOD>;

0 commit comments

Comments
 (0)