salesforce
Salesforce API Error Codes
errorCode values returned by the Salesforce REST, SOAP, and Bulk APIs when a request fails, along with common Apex governor-limit and DML exceptions.
19 codes
references developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/errorcodes.htmdeveloper.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dml_exception_handling.htm
· All codes 19 codes
- API_DISABLED_FOR_ORG API Disabled For Org The org's edition or license does not include API access, or API access has been explicitly disabled, so no API calls of any kind are permitted.
- DUPLICATE_VALUE Duplicate Value The request attempted to create or update a record with a value that violates a unique field constraint, such as a duplicate external ID or a field marked unique in the schema.
- ENTITY_IS_DELETED Entity Is Deleted The record targeted by the operation has already been deleted (and may be in the Recycle Bin), so it can no longer be read, updated, or referenced.
- FIELD_CUSTOM_VALIDATION_EXCEPTION Field Custom Validation Exception The record failed a custom validation rule defined in the org. The accompanying message text is the error message configured on the validation rule itself.
- INSUFFICIENT_ACCESS_OR_READONLY Insufficient Access or Readonly The running user's profile, permission set, or sharing rules do not grant the access level required for the operation, or the field/object is read-only for that user.
- INVALID_CROSS_REFERENCE_KEY Invalid Cross Reference Key A lookup or master-detail field referenced a record ID that does not exist, has been deleted, or is not visible to the running user.
- INVALID_FIELD Invalid Field The request referenced a field name that does not exist on the object, is misspelled, or is not accessible via the API (for example, a field excluded from the API version used).
- INVALID_LOGIN Invalid Login The username/password (or OAuth credentials) supplied to the login call are incorrect, the user is locked out, or the request originates from an IP range not permitted by the org's login access policies.
- INVALID_QUERY_LOCATOR Invalid Query Locator The queryLocator value passed to a query/queryMore call is malformed, expired, or does not correspond to an open query cursor in the current session.
- INVALID_SESSION_ID Invalid Session ID The session ID (access token) used to authenticate the API call is not valid. Returned as a 401 Unauthorized response. The session may have expired, been revoked, or the API endpoint may not match the org that issued the token.
- INVALID_TYPE Invalid Type The sObject type specified in the request URI or body does not exist, is misspelled, or is not a valid API name for the target org.
- MALFORMED_ID Malformed ID An ID value passed to the API is not 15 or 18 characters long, or contains characters that are not valid for a Salesforce record ID.
- MALFORMED_QUERY Malformed Query The SOQL or SOSL query passed to the API has invalid syntax, for example an unbalanced parenthesis, an unsupported operator, or a reference to a nonexistent field or relationship.
- MIXED_DML_OPERATION Mixed DML Operation Apex code attempted to perform DML on setup objects (such as User or Group) and non-setup objects in the same transaction. Salesforce disallows mixing these to avoid locking issues; separate them using @future or Queueable Apex.
- QUERY_TIMEOUT Query Timeout The SOQL query took too long to execute and was terminated by the platform. Usually caused by a query over a large volume of data without a selective, indexed filter.
- REQUEST_LIMIT_EXCEEDED Request Limit Exceeded The org exceeded its total API request limit for the 24-hour period, or exceeded the concurrent API request limit, causing the platform to throttle or reject further calls.
- REQUIRED_FIELD_MISSING Required Field Missing A create or update request omitted a value for a field that is marked required, either by page layout configuration or because it has no default and does not allow blanks.
- STORAGE_LIMIT_EXCEEDED Storage Limit Exceeded The org has reached its data or file storage allocation limit, so the record could not be created or updated. Free up storage or purchase additional storage to resolve.
- UNABLE_TO_LOCK_ROW Unable to Lock Row A DML operation could not acquire a lock on the target record(s) because another transaction is concurrently updating the same record or one of its parents. Retry the operation, typically with backoff.