Change to reporting for certain error cases that were previously reported through a DOMException with the message "Failed to read large IndexedDB value". Chromium 132 onwards, unrecoverable failures (such as due to file missing from disk) will throw a DOMException with the name "NotReadableError" and message "Data lost due to missing file. Affected record should be considered irrecoverable". Transient failures (such as due to low memory) will throw a DOMException with the name "UnknownError" and message "Failed to read large IndexedDB value". Note: Chromium versions 130 and 131 throw a DOMException with name "NotFoundError" for unrecoverable failures and "DataError" for transient failures, with no change to the message. More details: a large IndexedDB value (size above a threshold) is not stored directly in the underlying LevelDB database but is stored as a separate file. A get() request for this value looks up the blob reference from LevelDB and reads and returns the blob contents. If a failure occurs in this process, the browser fires an "error" event and sets the error property on the IDBRequest to a DOMException. This feature updates the DOMException to enable distinguishing recoverable and unrecoverable cases. Possible corrective actions for unrecoverable cases include deleting the entry from the DB, notifying the user, re-fetching the data from servers, etc.
Websites can and do use IndexedDB to store large data, and the blob files containing this data show up as opaque files to users in "choose large files from your disk to delete" tools. This makes the blob files susceptible to deletion when users are short on disk space. When only the blob files are deleted and not the corresponding LevelDB files that maintain references to these, the website's attempts to read this data permanently fail. Without a specific error to distinguish such uncrecoverable failures from transient failures, websites are forced to rely on heuristics to determine the appropriate corrective action.