Handle Errors in REST API

DescriptionResolutionHTTP ErrorCustom
Generic ExceptionEnsure you included the proper endpoint and resource.40010000
Invalid Data TypeEnsure the parameters of your request include the required data types.40010001
Missing Required FieldEnsure you include all required fields in the body of the request.40010002
Incorrect FormatEnsure you properly format your request.40010003
Invalid Message FormatSerialization error, please ensure the body has balanced braces and brackets.40010004
Invalid ValueEnsure you provide valid values in your request.40010005
Aggregate ErrorCheck additionalErrors for detailed error messages.40010006
Unsupported Media TypeEnsure you send a valid and accepted media format.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 token was not found in the request, or it is invalid or expired.4010
Authorization token invalid on URL or request bodyEnsure that access token is passed in the request header.40140004
GeneralEnsure you provide the correct resource.40340000
Not AuthenticatedEnsure you provide a valid token.40340001
Authorization token invalid on this endpointUse the stack-level endpoint that matches your token.40340002
Authorization token invalid on URLEnsure that access token is passed in the request header.40340003
Internal Server ErrorSee the response returned by the HTTP routing assertion.500
Service Not FoundThe resource you are trying to access does not exist. Ensure you provide the correct resource.596
DescriptionResolutionHTTP ErrorCustom
GenericEnsure you provide 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
Object Already ExistsAnother object with the same credentials already exists.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