# AuthenticationError

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

*** ** * ** ***

<br />

```
public final class AuthenticationError
```

<br />

*** ** * ** ***

Error returned from the Biometric Prompt flow that is executed by `https://developer.android.com/reference/androidx/credentials/CredentialManager` after the user makes a selection on the Credential Manager account selector.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationErrorTypes` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError#AuthenticationError(kotlin.Int,kotlin.CharSequence)(int errorCode, https://developer.android.com/reference/java/lang/CharSequence.html errorMsg)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final int` | `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError#getErrorCode()()` the error code denoting what kind of error was encountered while the biometric prompt flow failed, must be one of the error codes defined in `https://developer.android.com/reference/androidx/biometric/BiometricPrompt` such as `https://developer.android.com/reference/androidx/biometric/BiometricConstants#ERROR_HW_UNAVAILABLE()` or `https://developer.android.com/reference/androidx/biometric/BiometricConstants#ERROR_TIMEOUT()` |
| `final https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError#getErrorMsg()()` the message associated with the `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError#errorCode()` in the form that can be displayed on a UI. |
| `int` | `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError#hashCode()()` |

## Public constructors

### AuthenticationError

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

```
public AuthenticationError(int errorCode, CharSequence errorMsg)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getErrorCode

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

```
public final int getErrorCode()
```

the error code denoting what kind of error was encountered while the biometric prompt flow failed, must be one of the error codes defined in `https://developer.android.com/reference/androidx/biometric/BiometricPrompt` such as `https://developer.android.com/reference/androidx/biometric/BiometricConstants#ERROR_HW_UNAVAILABLE()` or `https://developer.android.com/reference/androidx/biometric/BiometricConstants#ERROR_TIMEOUT()`

### getErrorMsg

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

```
public final CharSequence getErrorMsg()
```

the message associated with the `https://developer.android.com/reference/androidx/credentials/provider/AuthenticationError#errorCode()` in the form that can be displayed on a UI.

### hashCode

```
public int hashCode()
```