> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ulm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add or update authN ID errors

## Desired AuthN ID Already Used

These are the most common error cases and error codes returned by the [Add or Update Email, Mobile, or Alias](c_addUpdateAuthnID) Process. The Process returns this error if the user provides an AuthN ID that already exists in Digital Identity Management (i.e., the authN ID is already registered to either the current or another User entity).

```
**RESPONSE - body**{
    "processId": "56a248cd-a14f-421d-a9c1-1220de53848f",
    "lastStep": false,
    "processName": "userManagement.AddOrUpdateAuthnIdentifier.v1.0",
    "operationError": [
        {
            "code": "already-exist-authn-identifier",
            "type": "com.uxpsystems.mint.framework.ulm.process.service.ServiceStep.GeneralFailure",
            "message": "newAuthnIdentifier already exists",
            "authorities": [
                {
                    "authority": "ROLE_USER"
                }
            ]
        }
    ],
    "stepName": "AddOrUpdateAuthnIdentifierPrompt",
    "lastFailedStepAction": {
        "processId": "56a248cd-a14f-421d-a9c1-1220de53848f",
        "processName": "userManagement.AddOrUpdateAuthnIdentifier.v1.0",
        "displayMessage": "Please input required information",
        "parameters": {
            "newAuthnIdentifier": "String",
            "oldAuthnIdentifier": "String"
        },
        "stepName": "AddOrUpdateAuthnIdentifierPrompt"
    }
}
```

| `processId` | The unique identifier for this instance of the Process. |
| - | - |
| `processName` | Full name of the Process, including the category and version number. |
| `lastStep` | Boolean that indicates whether or not this was the last step in the Process. |
| `stepName` | The internal name of the step that the Process is currently on / just executed. |
| `operationError` | Array of possible error objects. Each object describes a specific error condition. |
| `code` | An error object's internal code name. |
| `type` | Internal reference of the operation error type. |
| `message` | Optional message that describes the error in a human readable format. |
| `authorities` | The list of authority roles currently granted to the user. Can be used to help supply context to authorization errors (e.g, a Process requires a user to be authenticated, but they are currently anonymous). |
| `lastFailedStepAction` | Object that repeats the previous Process step's details and required input. This allows the client / user to retry the request. |
| The Process error response also includes a `lastStepFailedAction` object that repeats the previous Process step's request. The user is free to retry after checking their spelling or changing the desired authN ID value. | |

## Error Codes

Below is a list of potential error codes that may be returned during the execution of this Process.

| HTTP Status | Digital Identity Management Error Code | Description |
| - | - | - |
| `400` | `process-terminated-with-too-many-retries` | The Process terminated after too many consecutive user input attempts. |

**Note:** See Common Process Error Codes.

| HTTP Status | Digital Identity Management Error Code | Description |
| - | - | - |
| `400` | `invalid-authn-identifier-format` | `oldAuthnIdentifier` and `newAuthnIdentifier` do not match the same valid format.\*\*Note:\*\*This error is an operation error because it compares both fields to ensure they are the same format, i.e. both are mobile or both are email. |
| `400` | `non-existent-authn-identifier` | `oldAuthnIdentifier` is not found |
| `400` | `max-alias-exceeded` | The alias requested to add will cause us to exceed the maximum allowed number of aliases. |
| `400` | `invalid-credential` | The current user has no verified emails or mobiles, so we cannot allow them to add an alias. |
| `400` | `no-verified-authn-identifier` | Checks each individual field (old and new authN ID) to ensure they are both valid formats, but cannot cross check that the formats match each other until we get to the operational error checking phase. |
| `400` | `ValidAuthnIdentifier` | A valid `newAuthnIdentifier` was not supplied. |
| `409` | `already-exist-authn-identifier` | Duplicated authentication identifier. |
| **Parent topic:**[Add/Update Email, Mobile, or Alias Process](../topics/c_addUpdateAuthnID) | | |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.