---
schema_version: "1"
id: 0cd56aac8e9ad450ec90a67d2683ff884e26afadd232d6474981d4f1d5f6c3ee
title: Common Error Messages for Lightning Experience Methods
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/api-cti/guides/sforce-api-cti-error-messages-lightning.md
canonical_url: https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4c6bd3b2524776913ee46dabbe13f2f170a5b50d7e94a8cddd35aca361d20be2
products:
  - Open CTI Developer Guide
  - Service Cloud Developer Content
---

# Common Error Messages for Lightning Experience Methods

An error object is returned as an array for all Lightning Experience methods.

The following fields are contained as part of the error object.

- `code: {string}`

    - : A constant string denoting an error code.

 
- `description: {string}`

    - : A description of the error code.

 
- `details: {object}`

    - : Typically undefined. This constant can contain details about the error object for the `saveLog` method.

Sample error object:

```javascript
[{
   code: code1
   description: description1
   details: details1
   },{
   code: code2
   description: description2
   details: details2
}]
```

Sample error object for the INVALID_PARAM error code:

```javascript
[{
   code: "INVALID_PARAM",
   description: "An invalid value was passed to the parameter PARAMETERNAME. A numeric value was expected, but UNDEFINED was found instead."
}]
```

Sample error object for the GENERIC_PARAM error code:

```javascript
[{
   code: "GENERIC_ERROR",
   description: "An error occurred while calling the API method."
}]
```

Sample error object for the SERVER_ERROR code:

```javascript
[{
   code: "SERVER_ERROR",
   description: "A problem was encountered on the server."
}]
```

Sample error object for the SOFTPHONE_CONTAINER_ERROR code:

```javascript
[{
   code: "SOFTPHONE_CONTAINER_ERROR",
   description: "Unable to execute sendPostMessage because the softphone container hasn’t initialized yet."
}]
```

For the `runApex` method, if there is a server error, the `description` field provides `"Could not load Apex class: apexClassName."`

For the `saveLog` method, the `details` field provides information based on the type of error. For example:

```javascript
[{
   code:"GENERIC_ERROR",
   description:"An error occurred while calling the saveLog() API method. Review the Details field in the error section.",
   details:[{
         message:"An error occurred while trying to update the record. Please try again.",
         pageErrors:[],
         fieldErrors:{
            Name:[{
                  statusCode:"REQUIRED_FIELD_MISSING",
                  message:"Required fields are missing: [Name]",
                  fieldLabel:"Account Name",
                  columnApiName:"Name"
               }]
            },
         potentialDuplicates:[]
      }]
}]

```

