开发者社区> 问答> 正文

内容协作平台API错误处理有哪些?

内容协作平台API错误处理有哪些?

展开
收起
小天使爱美 2020-03-30 18:34:59 1756 0
2 条回答
写回答
取消 提交回答
  • 错误格式 当 CCP 在处理请求时,若发生异常,返回值形如

    { "Message": "The input parameter file_id is not valid.", "RequestId": "772328B2-E5F4-453C-9C23-CCCCCCCC", "Code": "InvalidParameter" } 且 HTTP 状态码也会相应变化。其中:

    Code 为错误码,提示错误类型; Message 为错误消息,提示错误的原因和解决办法; RequestId 为请求的唯一ID。如果您需要提工单咨询,请提供该值。 通用错误码表 以下列出了通用错误码表,涵盖大部分可能出现的错误。其中:

    {parameter_name} 和 {resource_name} 在实际返回的响应中,分别对应 字段名称 和 资源类型 。 HTTP Status Code 列为响应的 HTTP 状态码。 Message 列中的信息可能与实际返回的响应略有不同,这通常是为了提示更具体的错误信息。 HTTP Status Code Code Message 400 InvalidParameter The input parameter {parameter_name} is not valid. 400 InvalidParameterEmpty The input parameter {parameter_name} is empty. 400 InvalidParameterWrongFormat The input parameter {parameter_name} has invalid format. 400 InvalidRequestJSONFormat The input parameter {parameter_name} is invalid Json format. 400 InvalidParameterNotSupported The input parameter {parameter_name} is not supported. 400 InvalidParameterMissing The input parameter {parameter_name} is missing. 400 InvalidParameterNotMatch The input parameter {parameter_name} doesn’t match. 400 InvalidParameterOutOfRange The input parameter {parameter_name} doesn’t match the limitation. 400 InvalidParameterExpired The input parameter {parameter_name} is expired. 400 QuotaExhausted The resource {resource_name} has exceeded the limit. 400 InvalidResource The resource {resource_name} is not valid. 400 NotEmpty The resource {resource_name} is not empty. 404 InvalidResourceIsEmpty The resource {resource_name} is empty. 400 InvalidResourceUnsupported The resource {resource_name} is not supported. 400 NotFound The resource {resource_name} cannot be found. 400 AlreadyExist The resource {resource_name} has already exists. 403 Forbidden User not authorized to operate on the specified APIs. 403 ForbiddenNoPermission No Permission to access resource {resource_name}. 403 ForbiddenAccountNotFound The specified account does not exist. 403 ForbiddenAccountInDebt The specified account is in debt. 403 ForbiddenServiceRole Cannot access specified service role. 403 ForbiddenRiskControl This operation is forbidden by Alibaba Cloud RiskControl system. 400 StateConflict User operation is not valid. Please try again later. 500 InternalError The request has been failed due to some unknown error. Please try again later. 405 HTTPMethodNotAllowed The request http method is not supported for this resource. Please refer to document. 503 ServiceUnavailable The request has failed due to a temporary failure of the server. Please try again later. 400 Throttling The operation is blocked due to throttling control. 400 IncorrectStatus The current status does not support this operation. 400 InvalidHeader Header {header_name} is not valid. 400 SignatureDoesNotMatch SignatureDoesNotMatch. 400 DriveRelativePathNested The input parameter relative_path nested inside of another relative_path: {path}. 400 Sha1Conflict Find multiple objects of the same sha1. 400 ReadBodyError Read body error.

    2020-03-30 23:42:28
    赞同 展开评论 打赏
  • 有点尴尬唉 你要寻找的东西已经被吃掉啦!

    响应 200

    {
      "items" : [ ]
    }
    

    响应 400

    {
      "code" : "InvalidParameterMissing",
      "message" : "The input parameter {parameter_name} is missing."
    }
    

    响应 403

    {
      "code" : "Forbidden",
      "message" : "User not authorized to operate on the specified APIs."
    }
    

    响应 500

    {
      "code" : "InternalError",
      "message" : "The request has been failed due to some unknown error."
    }
    

    绑定用户认证方式

    POST /v2/account/link
    
    2020-03-30 19:52:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Boot2.0实战Redis分布式缓存 立即下载
CUDA MATH API 立即下载
API PLAYBOOK 立即下载