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

# Register AuthN ID as MFA Errors

The most common errors returned by the [Register AuthN ID as MFA](c_registerAuthnAsMFA) Process.

## Invalid OTP

When the user is prompted for a verification code, and they then provide an incorrect OTP, the Process responds with an `HTTP 400` status. The body includes an `operationErrors` array with the reason(s) as to what went wrong:

```
**RESPONSE - body**
{
   "processId": "6901dc4f-1841-4671-b3a7-a5fb341488a0",
   "operationErrors": [
      {
         "code": "invalid-otp",
         "type": "com.uxpsystems.mint.framework.ulm.process.service.ServiceStep.GeneralFailure",
         "message": "OTP is not valid",
         "authorities": [
            {
               "authority": "ROLE_USER"
            }
         ]
      }
   ],
   "lastStep": false,
   "processName": "userManagement.RegisterAuthnIdentifierAsMFA.v1.0",
   "stepName": "OTPPrompt",
   "lastFailedStepAction": {
      "processId": "6901dc4f-1841-4671-b3a7-a5fb341488a0",
      "processName": "userManagement.RegisterAuthnIdentifierAsMFA.v1.0",
      "stepName": "OTPPrompt",
      "displayMessage": "Please input required information",
         "output": {
            "pkat": "88e5ee81-0ea3-47d0-b724-5da55a303f89"
         },
      "parameters": {
         "pkat": "String",
         "otp": "String"
      }
   }
}
```

The response also includes a `lastStepFailedAction` object that repeats the previous Process step's response, so that the user can re-attempt their OTP input.

| `processId` | The unique identifier for this instance of the Process. |
| - | - |
| `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. |
| `lastFailedStepAction` | Object that repeats the previous Process step's details and required input. This allows the client to essentially retry the failed request. |
| `operationErrors` | Array of possible error objects. Each object describes a separate 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 (i.e., a Process requires a user to be authenticated to Storefront Gateway, however they are currently anonymous). |

## Error Codes

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

**Note:** See [Common Process Error Codes](c_commonProcessErrors).

| HTTP Status | Storefront Gateway Business Error Code | Description |
| - | - | - |
| `400` | `user-without-authn-id` | The User entity does not have a verified authN ID (e.g., a Soft Profile). |
| `400` | `invalid-credential` | The user provided an incorrect password. |
| `400` | `password-unset` | The user does not have a set password. In order to add a second factor, the user must first set a password (i.e., [Update Password](c_updatePassword) Process). |
| `401` | `invalid-otp` | The verification code that the user provided is incorrect. |
| `401` | `option-not-found` | The specified authentication identifier (authN ID) is invalid. Possible reasons include:- It does not exist in Storefront Gateway - It is not registered to the current User entity - It is not in the correct email or mobile number format - It does not have an activated status - It is an alias - The authN ID selection number was not in the available options (e.g., if the user only had an option "1" and option "2" but the client specified an option "4" in the subsequent process step request). |
| **Parent topic:**[Register Email or Mobile as MFA Process](c_registerAuthnAsMFA) | | |


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