开发者社区> 问答> 正文

日志服务的通用错误码有哪些?

日志服务的通用错误码有哪些?

展开
收起
保持可爱mmm 2020-03-26 22:50:36 751 0
1 条回答
写回答
取消 提交回答
  • 当 API 请求发生错误的时候,服务端会返回错误信息,包括 HTTP 的 Status Code 和响应 Body 中的具体错误细节。其中响应 Body 中的错误细节为如下格式:

    { "errorCode" : , "errorMessage" : } 在所有服务端可能返回的错误信息中,一部分适用于多数 API,而另外一部分则为某些 API所独有。下表即为 API 响应中的通用错误码,它们会在多个 API 响应中出现。而每个 API 所独有的错误码会在该 API 参考中单独描述。 表 1. 通用错误码

    HTTP 状态码(Status Code) 错误码(Error Code) 错误消息(Error Message) 描述(Description) 411 MissingContentLength Content-Length does not exist in http header when it is necessary. 没有提供必须的 Content-Length 请求头。 415 InvalidContentType Content-Type {type} is unsupported. 不支持 Content-Type 指定的类型。 400 MissingContentType Content-Type does not exist in http header when body is not empty. 没有为 Body 不为空的 HTTP 请求指定 Content-Type 头。 400 MissingBodyRawSize x-log-bodyrawsize does not exist in header when it is necessary. 压缩场景下没有提供必须的 x-log-bodyrawsize 请求头。 400 InvalidBodyRawSize x-log-bodyrawsize is invalid. x-log-bodyrawsize 的值无效。 400 InvalidCompressType x-log-compresstype {type} is unsupported. x-log-compresstype 指定的压缩方式不支持。 400 MissingHost Host does not exist in http header. 没有提供 HTTP 标准请求头 Host。 400 MissingDate Date does not exist in http header. 没有提供 HTTP 标准请求头 Date。 400 InvalidDateFormat Date {date} must follow RFC822. Date 请求头的值不符合 RFC822 标准。 400 MissingAPIVersion x-log-apiversion does not exist in http header. 没有提供 HTTP 请求头 x-log-apiversion。 400 InvalidAPIVersion x-log-apiversion {version} is unsupported. HTTP 请求头 x-log-apiversion 的值不支持。 400 MissAccessKeyId x-log-accesskeyid does not exist in header. 没有在 Authorization 头部提供 AccessKeyId。 401 Unauthorized The AccessKeyId is unauthorized. 提供的 AccessKeyId 值未授权。 400 MissingSignatureMethod x-log-signaturemethod does not exist in http header. 没有提供 HTTP 请求头 x-log-signaturemethod。 400 InvalidSignatureMethod signature method {method} is unsupported. x-log-signaturemethod 头部指定的签名方法不支持。 400 RequestTimeTooSkewed Request time exceeds server time more than 15 minutes. 请求的发送时间超过当前服务处理时间前后 15 分钟的范围。 404 ProjectNotExist Project {name} does not exist. 日志项目(Project)不存在。 401 SignatureNotMatch Signature {signature} is not matched. 请求的数字签名不匹配。 403 WriteQuotaExceed Write quota is exceeded. 超过写入日志限额。 403 ReadQuotaExceed Read quota is exceeded. 超过读取日志限额。 500 InternalServerError Internal server error message. 服务器内部错误。 503 ServerBusy The server is busy, please try again later. 服务器正忙,请稍后再试。 错误消息中包括 {…} 部分为出错相关的具体信息。例如,ProjectNotExist 的错误消息中包括{name},表示错误消息中该部分会被具体的 Project Name 来替换。

    2020-03-26 22:53:08
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载