Newer Version Available
Status Codes and Error Responses
The response header contains an HTTP status code. If the response isn’t successful, the
response body contains an error message, and if appropriate, information about the field or
object where the error occurred.
| HTTP Status Code | Description |
|---|---|
| 200 | A request succeeded. The information returned with the response depends on the method of the request. |
| 201 | A request succeeded, and a new resource was created. |
| 202 | A request was accepted for processing, but processing isn't complete. |
| 204 | A request succeeded, and there isn't content to send in the response, such as with a DELETE request. |
| 400 | The request isn’t understood, usually because the ID isn’t valid for the particular resource. For example, if you use a userId where a groupId is required, the request returns 400. |
| 401 | The session ID or OAuth token expired or is invalid. Or, if the request is made by a guest user, the resource isn’t accessible to guest users. The response body contains the message and errorCode. |
| 403 | The request is refused. Verify that the context user has the appropriate permissions to access the requested data, or that the context user is not an external user. |
| 404 | Either the specified resource isn’t found, or the resource is deleted. |
| 409 | A conflict occurred. For example, an attempt to update a request to join a group results in a conflict when that request was already approved or rejected. |
| 410 | The requested resource is retired or removed. Delete or update references to the resource. |
| 412 | A precondition failed. For example, in a batch request, if haltOnError is true and a subrequest fails, subsequent subrequests return 412. |
| 422 | The request couldn’t be processed because it contains invalid data. |
| 429 | Too many requests in a 24-hour period. |
| 500 | An error occurred within Salesforce, so the request couldn’t complete. |
| 503 | Too many requests in an hour, or the server is down for maintenance. |
Example
This request requires a comment ID, but it uses a feed item ID
instead.
The
response body is: