Added in API level 34

CreateCredentialException


open class CreateCredentialException : Exception
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ android.credentials.CreateCredentialException

Represents an error encountered during the CredentialManager#createCredential(Context, CreateCredentialRequest, operation.

Summary

Constants
static String

The error type value for when the given operation failed due to internal interruption.

static String

The error type value for when no create options are available from any provider(s), for the given CredentialManager#createCredential(Context, CreateCredentialRequest, request.

static String

The error type value for when the given operation failed due to an unknown reason.

static String

The error type value for when the user intentionally cancelled the request.

Public constructors

Constructs a CreateCredentialException.

CreateCredentialException(type: String, message: String?, cause: Throwable?)

Constructs a CreateCredentialException.

Constructs a CreateCredentialException.

Constructs a CreateCredentialException.

Public methods
open String

Returns the specific exception type.

Constants

TYPE_INTERRUPTED

Added in API level 34
static val TYPE_INTERRUPTED: String

The error type value for when the given operation failed due to internal interruption. Retrying the same operation should fix the error.

Value: "android.credentials.CreateCredentialException.TYPE_INTERRUPTED"

TYPE_NO_CREATE_OPTIONS

Added in API level 34
static val TYPE_NO_CREATE_OPTIONS: String

The error type value for when no create options are available from any provider(s), for the given CredentialManager#createCredential(Context, CreateCredentialRequest, request.

Value: "android.credentials.CreateCredentialException.TYPE_NO_CREATE_OPTIONS"

TYPE_UNKNOWN

Added in API level 34
static val TYPE_UNKNOWN: String

The error type value for when the given operation failed due to an unknown reason.

Value: "android.credentials.CreateCredentialException.TYPE_UNKNOWN"

TYPE_USER_CANCELED

Added in API level 34
static val TYPE_USER_CANCELED: String

The error type value for when the user intentionally cancelled the request.

This is a strong indicator that your app should refrain from making the same api call for a certain amount of time to provide a better user experience.

Value: "android.credentials.CreateCredentialException.TYPE_USER_CANCELED"

Public constructors

CreateCredentialException

Added in API level 34
CreateCredentialException(
    type: String,
    message: String?)

Constructs a CreateCredentialException.

Parameters
type String: This value cannot be null.
message String?: This value may be null.
Exceptions
java.lang.IllegalArgumentException If type is empty.

CreateCredentialException

Added in API level 34
CreateCredentialException(
    type: String,
    message: String?,
    cause: Throwable?)

Constructs a CreateCredentialException.

Parameters
type String: This value cannot be null.
message String?: This value may be null.
cause Throwable?: This value may be null.
Exceptions
java.lang.IllegalArgumentException If type is empty.

CreateCredentialException

Added in API level 34
CreateCredentialException(
    type: String,
    cause: Throwable?)

Constructs a CreateCredentialException.

Parameters
type String: This value cannot be null.
cause Throwable?: This value may be null.
Exceptions
java.lang.IllegalArgumentException If type is empty.

CreateCredentialException

Added in API level 34
CreateCredentialException(type: String)

Constructs a CreateCredentialException.

Parameters
type String: This value cannot be null.
Exceptions
java.lang.IllegalArgumentException If type is empty.

Public methods

getType

Added in API level 34
open fun getType(): String

Returns the specific exception type.

Return
String This value cannot be null.