# GetPublicKeyCredentialException

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/GetPublicKeyCredentialException.kt+class:androidx.credentials.exceptions.publickeycredential.GetPublicKeyCredentialException) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***

<br />

```
open class GetPublicKeyCredentialException : GetCredentialException
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||
|   |   | ↳ | [androidx.credentials.exceptions.GetCredentialException](https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/GetCredentialException) ||
|   |   |   | ↳ | [androidx.credentials.exceptions.publickeycredential.GetPublicKeyCredentialException](https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/publickeycredential/GetPublicKeyCredentialException) |

Known direct subclasses [GetPublicKeyCredentialDomException](https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/publickeycredential/GetPublicKeyCredentialDomException)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/publickeycredential/GetPublicKeyCredentialDomException` | During the get-passkey flow, this is thrown when a DOM Exception is thrown, indicating the operation contains a DOMException error type. |

*** ** * ** ***

A subclass of CreateCredentialException for unique exceptions thrown specific only to PublicKeyCredentials. See `https://developer.android.com/reference/kotlin/androidx/credentials/CredentialManager` for more details on how Credentials work for Credential Manager flows.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/publickeycredential/GetPublicKeyCredentialException#type()` is null |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/credentials/exceptions/publickeycredential/GetPublicKeyCredentialException#type()` is empty |

## Summary

### Inherited functions

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintStream.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintWriter.html)`

### Inherited properties

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/cause.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/localized-message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/stack-trace.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/suppressed.html`