Re: [w3c/IndexedDB] Specify the exception for read failures arising due to partial data loss on the file system (Issue #423)

Thanks, Evan, Andrew. Let me work on a spec PR to:
1. Specify in the description of `UnknownError` that it should be used for transient reasons.
2. Add an entry for `NotReadableError` under https://w3c.github.io/IndexedDB/#exceptions.
3. Add an additional step under all applicable retrieval steps that says some version of `If the stored value is not readable due to a permanent error (such as data loss), throw a "NotReadableError" DOMException`.

Thoughts? Should we specify the conditions for throwing a `NotReadableError` in a common place instead of for individual methods?

> data corruption should result in the containing storage bucket being cleared

We discussed this briefly for Chromium too. Yes, deleting the storage bucket entirely would leave things in as consistent a state as possible, but it is a destructive action whose impact could vary based on how the website is using IndexedDB. Hence, it seemed better to surface the error clearly to the website so that it could take the right corrective action for its use case. We could discuss this further, though, and also perhaps solicit developer feedback.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/423#issuecomment-2373798308
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/IndexedDB/issues/423/2373798308@github.com>

Received on Wednesday, 25 September 2024 11:19:17 UTC