3. Exceptions
Each of the exceptions used in this document is a [DOMException](https://www.w3.org/TR/WebIDL-1/#idl-DOMException)
with a specific type. The exception types and properties such as legacy code value are defined in [WEBIDL].
The table below lists the [DOMException](https://www.w3.org/TR/WebIDL-1/#idl-DOMException)
s used in this document along with a description of the exception type’s usage.
Type | Description |
---|---|
AbortError | A request was aborted. |
ConstraintError | A mutation operation in the transaction failed because a constraint was not satisfied. |
DataCloneError | The data being stored could not be cloned by the internal structured cloning algorithm. |
DataError | Data provided to an operation does not meet requirements. |
InvalidAccessError | An invalid operation was performed on an object. |
InvalidStateError | An operation was called on an object on which it is not allowed or at a time when it is not allowed, or if a request is made on a source object that has been deleted or removed. |
NotFoundError | The operation failed because the requested database object could not be found. |
QuotaExceededError | The operation failed because there was not enough remaining storage space, or the storage quota was reached and the user declined to give more space to the database. |
SyntaxError | The keyPath argument contains an invalid key path. |
ReadOnlyError | The mutating operation was attempted in a read-only transaction. |
TransactionInactiveError | A request was placed against a transaction which is currently not active, or which is finished. |
UnknownError | The operation failed for reasons unrelated to the database itself and not covered by any other errors. |
VersionError | An attempt was made to open a database using a lower version than the existing version. |
Given that multiple Indexed DB operations can throw the same type of error, and that a even single operation can throw the same type of error for multiple reasons, implementations are encouraged to provide more specific messages to enable developers to identify the cause of errors.