CreateCredentialException


abstract class CreateCredentialException : Exception

Known direct subclasses
CreateCredentialCancellationException

During the create credential flow, this is thrown when a user intentionally cancels an operation.

CreateCredentialCustomException

Represents a custom error thrown during a create flow with CredentialManager.

CreateCredentialInterruptedException

During the create credential flow, this is thrown when some interruption occurs that may warrant retrying or at least does not indicate a purposeful desire to close or tap away from credential manager.

CreateCredentialNoCreateOptionException

During the create credential flow, this is thrown when no viable creation options were found for the given CreateCredentialRequest.

CreateCredentialProviderConfigurationException

During the create credential flow, this is thrown when configurations are mismatched for the provider, typically indicating the provider dependency is missing in the manifest or some system service is not enabled.

CreateCredentialUnknownException

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

CreateCredentialUnsupportedException

During the create credential flow, this is thrown when credential manager is unsupported, typically because the device has disabled it or did not ship with this feature enabled.

CreatePublicKeyCredentialException

A subclass of CreateCredentialException for unique exceptions thrown specific only to PublicKeyCredentials.

CreateRestoreCredentialDomException

During the create restore credential flow, this is thrown when a DOM Exception is thrown, indicating the operation contains a DOMException error type.

E2eeUnavailableException

During the Restore Credential creation, this is thrown when the developer requests backup to cloud but the user device did not enable end-to-end-encryption or backup.

Known indirect subclasses
CreatePublicKeyCredentialDomException

During the create-passkey flow, this is thrown when a DOM Exception is thrown, indicating the operation contains a DOMException error type.


Represents an error thrown during a create flow with Credential Manager. See CredentialManager for more details on how Exceptions work for Credential Manager flows.

Summary

Public companion functions

Bundle

Helper method to convert the given ex to a parcelable Bundle, in case the instance needs to be sent across a process.

CreateCredentialException
fromBundle(bundle: Bundle)

Helper method to convert a Bundle retrieved through asBundle, back to an instance of CreateCredentialException.

Inherited properties

From kotlin.Throwable

Public companion functions

asBundle

Added in 1.5.0-alpha05
fun asBundle(ex: CreateCredentialException): Bundle

Helper method to convert the given ex to a parcelable Bundle, in case the instance needs to be sent across a process. Consumers of this method should use fromBundle to reconstruct the class instance back from the bundle returned here.

fromBundle

Added in 1.5.0-alpha05
fun fromBundle(bundle: Bundle): CreateCredentialException

Helper method to convert a Bundle retrieved through asBundle, back to an instance of CreateCredentialException.

Throws IllegalArgumentException if the conversion fails. This means that the given bundle does not contain a CreateCredentialException. The bundle should be constructed and retrieved from asBundle itself and never be created from scratch to avoid the failure.