Handle Errors in REST API

DescriptionResolutionHTTP ErrorCustom
Generic ExceptionVerify that you included the proper endpoint and resource.40010000
Invalid Data TypeConfirm that the parameters of your request include the required data types.40010001
Missing Required FieldConfirm that the request includes all required fields.40010002
Incorrect FormatVerify that the request is formatted correctly.40010003
Invalid Message FormatMake sure that the request body has balanced braces and brackets.40010004
Invalid ValueMake sure that all values in the request are of the correct data types.40010005
Aggregate ErrorCheck additionalErrors for detailed error messages.40010006
Unsupported Media TypeMake sure that all media formats in the request are valid and allowed.415
DescriptionResolutionHTTP ErrorCustom
General ExceptionEnsure you provide the correct resource.40320000
Business Rule Not SetReview the associated permissions and ensure you provide the proper configuration.40320001
Insufficient PrivilegesYour account lacks the privileges necessary to perform the request.40320002
DescriptionResolutionHTTP ErrorCustom
Not AuthorizedThe access token in the request is missing, invalid, or expired.4010
Authorization token invalid on URL or request bodyVerify that the request header contains a valid access token.40140004
GeneralEnsure the request specifies the correct resource.40340000
Not AuthenticatedVerify that the request header contains a valid access token.40340001
Authorization token invalid on this endpointUse the stack-level endpoint that matches your token.40340002
Authorization token invalid on URLVerify that the request header contains a valid access token.40340003
Internal Server ErrorSee the response returned by the HTTP routing assertion.500
Service Not FoundThe resource you’re trying to access doesn’t exist. Verify that the request specifies the correct resource.596
DescriptionResolutionHTTP ErrorCustom
GenericVerify that your request specifies the correct resource.40030000
Invalid OperationYour request uses an invalid HTTP operation for the resource. Modify the request to use a valid operation.40030001
Invalid State TransitionThis operation requests an invalid state transition for the resource. Ensure you request a valid state transition.40930002
Object Not FoundYour request can’t find any available data. Ensure you properly created your request.40430003
Execution Timeout ExpiredRetry the API call using Exponential Backoff.408
Object Already ExistsAn existing object has the same ID, key, or name as the object specified in the request. Provide a unique value and try again.40930004
Too many requestsRetry the API call after number of seconds specified in “Retry-After” header field.42950100
Too many requestsYour API requests are temporarily blocked due to too many concurrent requests. Contact Salesforce Customer Support for more information about the issue.42950200
Service UnavailableRetry the API call after number of seconds specified in “Retry-After” header field.50350300