Status and error codes
Updated
Troubleshoot common Cloud Transcoding REST API issues.
This page lists the response status codes for the Cloud Transcoding REST API, along with their descriptions and recommended actions.
Response status codes
When you call the Cloud Transcoding REST API, you receive an HTTP response status code:
- If the HTTP status code is
200, the request is successful. - If
Destroyreturns206, the server hasn't finished processing the request. CallQueryto confirm the task status. - Any other status code means the request failed.
The following examples show responses to failed requests:
// 400 Bad Request: invalid parameter
{
"message": "#/transcoder/outputs is invalid after minItems schema validate"
}// 401 Unauthorized: authentication failure
{
"message": "Invalid authentication credentials"
}// 404 Not Found: task not found
{
"message": "The task is not found"
}When using Cloud Transcoding, you may receive status codes that indicate the service status. Refer to the following table to understand their meanings and take appropriate action.
| Status code | Description | Suggested action |
|---|---|---|
200 OK | The request was successful. | No troubleshooting is required. |
206 Partial Content | The server hasn't finished processing the request. Destroy can return this code. | Call Query with a backoff strategy to confirm the task status. |
400 Bad Request | The request syntax is incorrect, the parameter value does not meet the requirements, or your App ID does not have Cloud Transcoding enabled. | Investigate based on the message field in the response body. |
401 Unauthorized | The Authorization field for HTTP Basic authentication is invalid. | See RESTful authentication or check your Authorization credentials. |
403 Forbidden | Cloud Transcoding is not enabled for your App ID. | Enable Cloud Transcoding in Agora Console. |
404 Not Found | Transcoder not found. | Use a backoff strategy to make a query request and confirm whether the transcoder was created successfully. |
409 Conflict | A transcoder task with the same instanceId already exists. | Delete the existing transcoder before creating a new one. |
429 Too Many Requests | The request rate exceeds the upper limit. | Wait for a while and try again. |
500 Internal Server Error | Internal Agora server error. | Use a backoff strategy for query requests or contact technical support. |
501 Not Implemented | This method is not implemented. | No troubleshooting is required. |
503 Service Unavailable | The Agora server is temporarily overloaded or undergoing maintenance. | Use a backoff strategy for query requests or contact technical support. |
504 Gateway Timeout | An internal Agora server error occurred, an upstream server did not respond, or the upstream server is shut down. | Use a backoff strategy for query requests or contact technical support. |
When using the Cloud Transcoding response status code for troubleshooting, keep the following in mind:
- If the request fails, do not perform logical processing based on the
messagefield in the response body. Rely primarily on the status code for troubleshooting. - If the troubleshooting methods in the table do not resolve the issue, contact technical support with the values of the
X-Request-IDandX-Resource-IDfields in the response header. - If you receive a
404status code after aCreaterequest has returned successfully and you have not calledDelete, or if the transcoder remains idle beyond theidleTimeoutvalue in the request, use a backoff algorithm. Retry at increasing intervals of 5, 10, and 15 seconds to callQueryfor confirmation. - A
5XXresponse status code usually indicates an issue in the server response process. Use a backoff strategy for query requests, retrying at increasing intervals of 5, 10, and 15 seconds, or contact technical support.
