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

# Social account errors

These are the most common error cases and error codes returned by the [Onboard and Authenticate User with Social Account](c_onboardAuthenticateUserSocial) Process.

This topic covers some of the basic error scenarios with the Process.

## Onboarding: Existing User Found, Invalid Password

During the onboarding flow, if Digital Identity Management receives an email or mobile from the social provider, and discovers an existing Digital Identity Management User with a matching email or mobile, then the Process prompts the client for the user's password. Should the user then provide an invalid password, the Process responds with a `HTTP 400` status. The body includes a `operationsError` array with the reason(s) as to what went wrong:

```
**RESPONSE - body**
{ 
   "processId": "2a561555-e206-403b-aafc-0aa63a0dc3d9", 
   "lastStep": false, 
   "processName": "socialFederation.SocialMediaAssistedOnboarding.v1.0", 
   "operationErrors": [ 
      { "code": "authentication-required", 
         "type": "com.uxpsystems.mint.framework.ulm.process.service.ServiceStep.GeneralFailure", 
         "message": "Bad credentials", 
         "authorities": [ 
            { 
               "authority": "ROLE_ANONYMOUS" 
            } 
         ] 
      } 
   ], 
   "stepName": "CredentialPrompt", 
   "lastFailedStepAction": { 
      "processId": "2a561555-e206-403b-aafc-0aa63a0dc3d9", 
      "processName": "socialFederation.SocialMediaAssistedOnboarding.v1.0", 
      "parameters": { 
         "credential": "String" 
      }, 
      "stepName": "CredentialPrompt", 
      "output": { 
         "providerId": "facebook", 
         "socialUserInfo": { 
            "id": "1425242407805720", 
            "email": "bob@example.com", 
            "firstName": "Bob", 
            "lastName": "Jones" 
         } 
      } 
   } 
}
```

The Process error response also includes a `lastStepFailedAction` object that repeats the previous Process step's request. The user can re-attempt their request to provide their 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. |
| `operationErrors` | Array of possible error objects. Each object describes a separate error condition. |
| `code` | The name of the specific field where the error occurred. |
| `type` | An error object's internal code name. |
| `message` | The actual value that caused the error |
| `lastFailedStepAction` | Object that repeats the previous Process step's details and required input. This allows the client to easily 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 | Digital Identity Management Error Code | Description |
| - | - | - |
| `400` | `not-supported-provider` | The client specified an invalid social provider in the initial Process request. Note that this could be a provider that is actually supported, and configured in the Digital Identity Management Admin console, but the **Enable** setting is currently toggled off. Alternatively, this could be a completely unknown or incorrect `providerId`. |
| `400` | `missing-input-params` | Missing an expected input parameter.This can occur in the onboarding flow, once the user is prompted to confirm details from the social provider. If the user clears/deletes the email or mobile, and the client submits its request, then the Process returns this error. |
| `400` | `invalid-email-format` | Email does not match the valid format.This can occur in the onboarding flow, once the user is prompted to confirm details from the social provider. The user changes the email value, and submits an email with an invalid format. |
| `400` | `invalid-phone-format` | Phone does not match the valid format.This can occur in the onboarding flow, once the user is prompted to confirm details from the social provider. The user changes the mobile number, and submits an invalid number. |
| `401` | `process-terminated-user-denies-claims` | The user did not consent to share their provider information with Digital Identity Management. |
| `401` | `authentication-required` | User not found or credential is not valid. |
| `401` | `user-profile-locked` | The User is temporarily locked.When the provider returns data to Digital Identity Management, and Digital Identity Management discovers an existing User with a matching email/mobile and password, it will then prompt the end user to provide that password to prove who they are. If the end user provides an incorrect password a number of times, they will be temporarily locked out. |
| **Parent topic:**[Onboard and Authenticate User with Social Account Process](../topics/c_onboardAuthenticateUserSocial) | | |


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