响应状态码

更新时间不可用

查询旁路推流的响应状态码、错误码含义、常见原因和处理建议。

在调用旁路推流 API 过程中,你可能收到如下 HTTP 响应状态码:

  • 如果 HTTP 状态码为 2XX,则请求成功。

  • 如果 HTTP 状态码不为 2XX,则请求失败。你可以根据对应的响应体中可能出现的 message 以及 reason 字段排查问题。

例如,请求失败时,你可能收到如下响应:

JSON
# 400 Bad Request
# 仅有 message
{
  "message": "appid is invalid"
}
JSON
# 403 Forbidden
# 仅有 reason
{
  "reason": "No invalid permission to use this function. Contact us."
}
状态码可能的 message 或 reason 字段内容原因建议措施
200 OK无该字段。创建成功。无需处理。
400 Bad Request
  • Invalid parameter: rtmpUrl. Replace it and retry.
  • Invalid parameter: idleTimeout. Replace it and retry.
请求参数错误。参考 HTTP 响应 Body 中的 message 或 reason 字段进行排查。
401 UnauthorizedInvalid authentication credentials.RESTful API 鉴权失败。重新进行 HTTP 基本认证。
403 ForbiddenNo valid permission to use this function. Contact us.未开通服务。开通旁路推流服务。
404 Not FoundResource is not found and destroyed.并未成功启动推流任务、启动任务后中途退出、自动迁移中、正在销毁 Converter。使用退避策略重试。
409 ConflictResource with the same name has already existed. Use the existing resource, otherwise delete it and create a new resource.已存在相同名称的 Converter。删除已有 Converter 并重新创建。
429 Too Many Requests
  • Request rate limit exceeded.
  • Resource quota limit exceeded.
  • No available resources.
并发请求过多,超出配额限制。等待一段时间再请求。
500 Internal Server ErrorInternal errors. Contact us for troubleshooting.服务端内部错误。使用退避策略重试。
501 Not ImplementedThe method requested has not been implemented.服务端内部错误。使用退避策略重试。
503 Service Unavailable
  • The server is temporarily overloading. Retry with a backoff strategy and contact us for troubleshooting.
  • The server is temporarily down. Retry with a backoff strategy.
服务端内部错误。使用退避策略重试。
504 Gateway TimeoutGateway timeout. Check whether the resource is created, if not, re-create a new resource.服务端内部错误。使用退避策略重试。
表格内容超出当前宽度,可横向滚动查看更多列。

信息

如果以上排查方法并未解决问题,请务必在日志中打印出响应 Header 中的 X-Request-ID 和 X-Resource-ID 字段值,并请联系技术支持。

以下是一个排查问题的示例:

使用 Create 创建 Converter 时,如果响应状态码为 409(Conflict) ,message 为 "Resource with the same name already exists.",则代表本次请求想创建的 Converter 和已经创建的 Converter 名字(name)重复,响应 Header 中的 X-Resource-ID 字段为那个同名 Converter 的 ID。请检查并修改本次请求填写的 Converter 名字,然后重新创建 Converter。