# CreatePublicKeyCredentialDomException

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/exceptions/publickeycredential/CreatePublicKeyCredentialDomException.kt+class:androidx.credentials.exceptions.publickeycredential.CreatePublicKeyCredentialDomException) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***


```
public final class CreatePublicKeyCredentialDomException extends CreatePublicKeyCredentialException
```

<br />

|---|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||||
|   |   | ↳ | [androidx.credentials.exceptions.CreateCredentialException](https://developer.android.com/reference/androidx/credentials/exceptions/CreateCredentialException) |||
|   |   |   | ↳ | [androidx.credentials.exceptions.publickeycredential.CreatePublicKeyCredentialException](https://developer.android.com/reference/androidx/credentials/exceptions/publickeycredential/CreatePublicKeyCredentialException) ||
|   |   |   |   | ↳ | [androidx.credentials.exceptions.publickeycredential.CreatePublicKeyCredentialDomException](https://developer.android.com/reference/androidx/credentials/exceptions/publickeycredential/CreatePublicKeyCredentialDomException) |

*** ** * ** ***

During the create-passkey flow, this is thrown when a DOM Exception is thrown, indicating the operation contains a DOMException error type. The fido spec can be found [here](https://webidl.spec.whatwg.org/#idl-DOMException-error-names). The full list of implemented DOMErrors extends from and can be seen at `https://developer.android.com/reference/androidx/credentials/exceptions/domerrors/DomError`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If `https://developer.android.com/reference/androidx/credentials/exceptions/publickeycredential/CreatePublicKeyCredentialDomException#domError()` is null |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/exceptions/publickeycredential/CreatePublicKeyCredentialDomException#CreatePublicKeyCredentialDomException(androidx.credentials.exceptions.domerrors.DomError,kotlin.CharSequence)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/exceptions/domerrors/DomError domError, https://developer.android.com/reference/java/lang/CharSequence.html errorMessage )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/exceptions/domerrors/DomError` | `https://developer.android.com/reference/androidx/credentials/exceptions/publickeycredential/CreatePublicKeyCredentialDomException#getDomError()()` the specific error from the DOMException types defined in the fido spec found [here](https://webidl.spec.whatwg.org/#idl-DOMException-error-names) |

### Inherited methods

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html exception)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/annotation/RecentlyNullable
https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` `@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull Throwable[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintStream)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintStream.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintWriter.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[] stackTrace)`

## Public constructors

### CreatePublicKeyCredentialDomException

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public CreatePublicKeyCredentialDomException(
    @NonNull DomError domError,
    CharSequence errorMessage
)
```

## Public methods

### getDomError

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public final @NonNull DomError getDomError()
```

the specific error from the DOMException types defined in the fido spec found [here](https://webidl.spec.whatwg.org/#idl-DOMException-error-names)