> ## 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.

# Forgot Password Errors

These are the most error cases and error codes returned by [Recover ID and Reset Password](c_forgotPassword) Processes.

## Invalid Password

If the user provides an invalid new password to the **Reset Password** Process, then Storefront Gateway responds with a `HTTP 400` status. The response body includes a `fieldErrors` array with the reason(s) as to what went wrong:

```
**ERROR RESPONSE - body**
{
    "processId": "8bca30ca-dd44-4050-aece-53b0dbed1922",
    "stepName": "NewPasswordPrompt",
    "lastStep": false,
    "fieldErrors": [
        {
            "field": "credential",
            "code": "NotWeakPassword",
            "rejectedValue": "test",
            "message": "password-regex-rule-violation-.*[0-9].*"
        },
        {
            "field": "credential",
            "code": "NotWeakPassword",
            "rejectedValue": "test",
            "message": "blacklisted-password"
        },
        {
            "field": "credential",
            "code": "NotWeakPassword",
            "rejectedValue": "test",
            "message": "password-regex-rule-violation-.{8,}"
        },
        {
            "field": "credential",
            "code": "NotWeakPassword",
            "rejectedValue": "test",
            "message": "password-regex-rule-violation-.*[A-Z].*"
        }
    ],
    "lastFailedStepAction": {
        "processId": "90163eaa-3d8a-4fa3-b2b5-100ea14b7a9f",
        "processName": "recovery.PasswordReset.v1.0",
        "displayMessage": "Please input required information",
        "parameters": {
            "newPassword": "String"
        },
        "stepName": "NewPasswordPrompt"
    }
}
```

In the above example, objects in the `fieldErrors` array indicate the following:

* The password fails to include at least one number (0-9)
* The password is on an internal list of commonly banned passwords
* The password fails to meet the minimum length of (8 characters)
* The password fails to include at least one capital (A-Z)

The Process error response also includes a `lastStepFailedAction` object that repeats the previous Process step's request. The user can re-attempt their request with a different (ideally stronger) password.

| `processId` | The unique identifier for this instance of the Process. |
| - | - |
| `stepName` | The internal name of the step that the Process is currently on / just executed. |
| `lastStep` | Boolean that indicates whether or not this was the last step in the Process. |
| `fieldError` | Array of possible error objects. Each object describes a separate error condition. |
| field | The name of the specific field where the error occurred. |
| `code` | An error object's internal code name. |
| `rejectedValue` | The actual value that caused the error |
| `message` | Optional message that describes the error. |
| `lastFailedStepAction` | Object that repeats the previous Process step's details and required input. This allows the client to retry the failed request. |

## 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` | `NotWeakPassword` | The password provided did not meet the minimum criteria for a sufficiently complex password. |
| `400` | `NotEmpty` | No password was supplied. |
| `400` | `process-terminated-with-too-many-retries` | Process terminated with too many failed user input attempts. |
| `400` | `process-terminated-with-invalid-domain` | Process terminated because of an invalid domain. |
| `400` | `option-not-found` | Client provided an invalid recovery option to the Process. |

**Parent topic:**[Recover ID & Reset Password Processes](c_forgotPassword)


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