DomError


abstract class DomError

Known direct subclasses
AbortError

During the create public key credential flow, this is thrown when an authenticator response exception contains an abort-err from the fido spec, indicating the operation was aborted.

ConstraintError

During the create public key credential flow, this is thrown when an authenticator response exception contains a constraint_err from the fido spec, indicating that some mutation operation occurring during a transaction failed by not satisfying constraints.

DataCloneError

During the create public key credential flow, this is thrown when an authenticator response exception contains a data_clone_err from the fido spec, indicating the object cannot be cloned.

DataError

During the create public key credential flow, this is thrown when an authenticator response exception contains a data_err code from the fido spec, indicating inadequate data provided.

EncodingError

During the create public key credential flow, this is thrown when an authenticator response exception contains an encoding_err code from the fido spec, indicating failure in encoding or decoding operations.

HierarchyRequestError

During the create public key credential flow, this is thrown when an authenticator response exception contains a hierarchy_request_err from the fido spec, indicating the operation would yield in an incorrect node tree.

InUseAttributeError

During the create public key credential flow, this is thrown when an authenticator response exception contains an inuse_attribute_err from the fido spec, indicating that an attribute is in used by another element.

InvalidCharacterError

During the create public key credential flow, this is thrown when an authenticator response exception contains an invalid_character_err from the fido spec, indicating a string contains invalid characters.

InvalidModificationError

During the create public key credential flow, this is thrown when an authenticator response exception contains an invalid_modification_err from the fido spec, indicating an object was incorrectly modified.

InvalidNodeTypeError

During the create public key credential flow, this is thrown when an authenticator response exception contains an invalid_node_type_err from the fido spec, indicating tthe supplied node is incorrect or has an incorrect ancestor for this operation.

InvalidStateError

During the create public key credential flow, this is thrown when an authenticator response exception contains a invalid_state_err code from the fido spec, indicating the object reached an invalid state.

NamespaceError

During the create public key credential flow, this is thrown when an authenticator response exception contains a namespace_err from the fido spec, indicating the operation is not allowed by namespaces in XML.

NetworkError

During the create public key credential flow, this is thrown when an authenticator response exception contains a network_err code from the fido spec, indicating a network error occurred.

NoModificationAllowedError

During the create public key credential flow, this is thrown when an authenticator response exception contains a no_modification_allowed_err from the fido spec, indicating the object can not be modified.

NotAllowedError

During the create public key credential flow, this is thrown when an authenticator response exception contains a not_allowed_err code from the fido spec, indicating a request is not allowed by the user agent or the platform in the current context - possibly because the user denied permission.

NotFoundError

During the create public key credential flow, this is thrown when an authenticator response exception contains a not_found_err from the fido spec, indicating the object could not be found in the current flow.

NotReadableError

During the create public key credential flow, this is thrown when an authenticator response exception contains a NotReadableError from fido, which indicates there was some I/O read operation that failed.

NotSupportedError

During the create public key credential flow, this is thrown when an authenticator response exception contains a not_supported_err code from the fido spec, indicating the operation is not supported.

OperationError

During the create public key credential flow, this is thrown when an authenticator response exception contains and operation_err from the fido spec, indicating the operation failed for an operation-specific reason.

OptOutError

During the create public key credential flow, this is thrown when an authenticator response exception contains and opt_out_error from the fido spec, indicating the user opted out of the process.

QuotaExceededError

During the create public key credential flow, this is thrown when an authenticator response exception contains a quota_exceeded_err from the fido spec, indicating the quota has been exceeded.

ReadOnlyError

During the create public key credential flow, this is thrown when an authenticator response exception contains a read_only_err from the fido spec, indicating a mutating operation was attempted in a "readonly" transaction.

SecurityError

During the create public key credential flow, this is thrown when an authenticator response exception contains a security_err code from the fido spec, indicating the operation is not secure.

SyntaxError

During the create public key credential flow, this is thrown when an authenticator response exception contains a syntax_err from the fido spec, indicating the string did not match the expected pattern.

TimeoutError

During the create public key credential flow, this is thrown when an authenticator response exception contains a timeout_err code from the fido spec, indicating the operation timed out.

TransactionInactiveError

During the create public key credential flow, this is thrown when an authenticator response exception contains and transaction_inactive_err from the fido spec, indicating a request was placed against a transaction which is currently not active.

UnknownError

This is thrown when the create public key credential operation failed with no more detailed information.

VersionError

During the create public key credential flow, this is thrown when an authenticator response exception contains a version_err from the fido spec, indicating an attempt was made to open a database using a lower version than the existing version.

WrongDocumentError

During the create public key credential flow, this is thrown when an authenticator response exception contains a wrong_document_err from the fido spec, indicating the object is the wrong document.


While CredentialManager flows use Exceptions, in some cases, the exceptions are focused on a range of widely used, uncommonly named 'errors'. This class should be used to generate subclass errors, packaged under an Exception superclass. Please see the example below for usage details.

For this codebase, we use this widely with errors from the public key credential and general web error specs, shown here.

In this example, we create a wrapper exception named CreatePublicKeyCredentialDomException. This contains a constructor that accepts a DomError. We then employ various sub classes to the DomError for individual error types, such as AbortError.

class AbortError : DomError(type_var) { ... }

Then it is expected that when abort errors show up in code, one can create the wrapper exception with the designed DomError subclass.

// ... (logic checking for abort error) ...
val exception = CreatePublicKeyCredentialDomException(AbortError(), e.getMessage())
// ... (logic using exception to throw or pass in callback) ...

This utilization may vary by use case.

Summary

Public constructors

Public constructors

DomError

Added in 1.2.0
DomError(type: String)