閱讀884 返回首頁    go 財經資訊


通用錯誤碼__API-Reference_日誌服務-阿裏雲

當 API請求發生錯誤的時候,服務端會返回錯誤信息,包括HTTP的Status Code和響應Body中的具體錯誤細節。其中響應Body中的錯誤細節為如下格式:

{
"errorCode" : <ErrorCode>,
"errorMessage" : <ErrorMessage>
}

在所有服務端可能返回的錯誤信息中,一部分適用於多數 API,而另外一部分則為某些 API所獨有。下表即為 API響應中的通用錯誤碼,它們會在多個 API響應中出現。而每個 API所獨有的錯誤碼會在該API參考中單獨描述。

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 heade. 沒有提供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來替換。

最後更新:2016-05-06 10:44:15

  上一篇:go 請求簽名__API-Reference_日誌服務-阿裏雲
  下一篇:go CreateLogstore__日誌庫相關接口_API-Reference_日誌服務-阿裏雲