# ImportCredentialsException

Artifact: [androidx.credentials.providerevents:providerevents](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents) [View Source](https://cs.android.com/search?q=file:androidx/credentials/providerevents/exception/ImportCredentialsException.kt+class:androidx.credentials.providerevents.exception.ImportCredentialsException) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/credentials-providerevents#1.0.0-beta01)

*** ** * ** ***


```
abstract class ImportCredentialsException : Exception
```

<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.providerevents.exception.ImportCredentialsException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsException) |

Known direct subclasses [ImportCredentialsCancellationException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsCancellationException), [ImportCredentialsInvalidJsonException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsInvalidJsonException), [ImportCredentialsNoExportOptionException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsNoExportOptionException), [ImportCredentialsProviderConfigurationException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsProviderConfigurationException), [ImportCredentialsSystemErrorException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsSystemErrorException), [ImportCredentialsUnknownCallerException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsUnknownCallerException), [ImportCredentialsUnknownErrorException](https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsUnknownErrorException)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsCancellationException` | During the import credentials flow, this is thrown when a user intentionally cancels an operation. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsInvalidJsonException` | The request json cannot be read because it is written in invalid format |
| `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsNoExportOptionException` | During the import credentials flow, this is thrown if there is no credential provider matched to handle the import request. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsProviderConfigurationException` | During the import credentials flow, this is thrown if a `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/ProviderEventsApiProvider` was not found to handle the request. |
| `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsSystemErrorException` | Used by the system when the request fails to reach the provider |
| `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsUnknownCallerException` | The request cannot be trusted because the caller is unknown |
| `https://developer.android.com/reference/kotlin/androidx/credentials/providerevents/exception/ImportCredentialsUnknownErrorException` | The credential json cannot be returned due to unknown error |

*** ** * ** ***

Represents an error thrown during the import flow.

## 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`