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

According to the [WebIDL spec](https://webidl.spec.whatwg.org/#unknownerror) `UnknownError` should be reserved for transient problems. We should probably update the IDB spec to reflect that distinction.

It was pointed out elsewhere that `NotFoundError` is usually used (in IDB) for cases where the most likely source of the error is the usage of the API, i.e. an index or object store is missing because it was never added.

I'd propose pulling `NotReadableError` into the IDB spec, which is described by WebIDL as "The I/O read operation failed." (No mention of transient or permanent.) The message text, AFAICT, is left to the implementation; in Chromium we'd likely add some more color such as "A file is missing and the value is irrecoverable. The record should be deleted or updated".

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

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

Received on Monday, 23 September 2024 18:41:21 UTC