請求錯誤碼(原生接口)
更新時間 2024-08-20 11:15:21
最近更新時間: 2024-08-20 11:15:21
分享文章
本章節介紹通過原生接口接入時的請求狀態碼。
如您使用原生接口接入,請參考以下狀態碼。
錯誤碼響應體
```xml
<?xml version='1.0' encoding='utf-8' ?>
<Error>
<Code>string</Code>
<Message>string</Message>
<Resource>string</Resource>
<RequestId>string</RequestId>
</Error>
響應體各元素的詳細定義請參見下表。
| 名稱 | 描述 |
|---|---|
| Error | 錯誤響應體中描述錯誤相關信息的根節點 |
| Code | 唯一錯誤碼,參考下面表格列出的常見錯誤碼描述 |
| Message | 對錯誤的具體描述 |
| Resource | 被錯誤關聯的請求資源信息 |
| RequestId | 錯誤對應的請求ID |
錯誤碼說明
發出請求后,如果遇到錯誤,在響應的錯誤信息中會包含錯誤碼等具體的錯誤信息。訪問對象存儲服務的錯誤碼如下表所示。
| 狀態碼 | 錯誤碼 | 描述 | 備注 |
|---|---|---|---|
| 301 Moved Permanently | PermanentRedirect | 嘗試訪問的桶必須使用指定的地址,請將以后的請求發送到這個地址 | |
| 307 Moved Permanently | TemporaryRedirect | 臨時重定向,當DNS更新時,請求將被重定向到bucket | |
| 304 Not Modified | NotModified | 資源沒有發生改變 | |
| 400 Bad Request | AmbiguousGrantByEmailAddress | 提供的電子郵件地址與多個帳戶關聯 | |
| 400 Bad Request | AuthorizationHeaderMalformed | 提供的授權header無效 | |
| 400 Bad Request | CredentialsNotSupported | 此請求不支持憑據 | |
| 400 Bad Request | ExpiredToken | 提供的令牌已過期 | |
| 400 Bad Request | IllegalVersioningConfigurationException | 請求中指定的版本控制配置無效 | |
| 400 Bad Request | InvalidArgument | 缺少特定參數或者參數不合法 | |
| 400 Bad Request | IncompleteBody | 未提供Content-Length HTTP頭指定的字節數 | |
| 400 Bad Request | InvalidBucketName | 桶的名字不合法 | |
| 400 Bad Request | IncorrectNumberOfFilesInPostRequest | 每個請求只需要上載一個文件 | |
| 400 Bad Request | MalformedXML | xml格式有問題 | 標簽xml、跨域xml等 |
| 400 Bad Request | BadDigest | 請求中設置的ContentMD5的值與服務端接收到文件的MD5值不符 | |
| 400 Bad Request | InvalidDigest | 客戶端指定的對象內容的MD5值無效 | |
| 400 Bad Request | InlineDataTooLarge | 內聯數據超過了允許的最大大小 | |
| 400 Bad Request | InvalidObjectName | 對象的名字不合法 | |
| 400 Bad Request | EntityTooLarge | 上傳的文件太大 | |
| 400 Bad Request | EntityTooSmall | 建議上傳的對象小于允許的最小對象大小 | |
| 400 Bad Request | InvalidPart | 合并分片的數量有問題,一個或者多個指定的分片未找到 | |
| 400 Bad Request | InvalidPartOrder | 段列表的順序不是升序,段列表必須按段號升序排列 | |
| 400 Bad Request | MalformedACLError | 提供的XML格式不正確,或者未根據已發布的架構進行驗證 | |
| 400 Bad Request | InvalidTag | 設置標簽數量太多或者標簽內容長度超出限制 | |
| 400 Bad Request | InvalidEncryptionAlgorithmError | 指定的加密請求無效。有效值為aes256 | |
| 400 Bad Request | InvalidLocationConstraint | 指定的位置約束無效 | |
| 400 Bad Request | InvalidPolicyDocument | 表單內容不符合策略文檔中指定的條件 | |
| 400 Bad Request | InvalidSOAPRequest | SOAP請求正文無效 | |
| 400 Bad Request | InvalidStorageClass | 指定的存儲類無效 | |
| 400 Bad Request | InvalidTargetBucketForLogging | 用于日志記錄的目標bucket不存在、不歸您所有或沒有授權 | |
| 400 Bad Request | InvalidToken | 提供的令牌格式不正確或無效 | |
| 400 Bad Request | InvalidURI | 無法分析指定的URI | |
| 400 Bad Request | KeyTooLongError | Key太長 | |
| 400 Bad Request | MalformedPOSTRequest | POST請求的主體不符合格式規范 | |
| 400 Bad Request | MaxMessageLengthExceeded | 請求的長度過長 | |
| 400 Bad Request | MaxPostPreDataLengthExceededError | 上載文件之前的POST請求字段太大 | |
| 400 Bad Request | MetadataTooLarge | 元數據頭超過了允許的最大元數據大小 | |
| 400 Bad Request | MissingRequestBodyError | 以請求的形式發送空XML文檔 | |
| 400 Bad Request | MissingSecurityElement | SOAP 1.1請求缺少安全元素 | |
| 400 Bad Request | MissingSecurityHeader | 請求缺少必需的頭 | |
| 400 Bad Request | NoLoggingStatusForKey | 不存在以日志狀態呈現的key的子資源 | |
| 400 Bad Request | RequestIsNotMultiPartContent | bucket post必須是enclosure類型的multipart/form數據 | |
| 400 Bad Request | RequestTimeout | 請求超時。服務端還沒有收到完整的請求 | |
| 400 Bad Request | RequestTorrentOfBucketError | 不允許訪問bucket的Torrent文件的請求 | |
| 400 Bad Request | ServerSideEncryptionConfigurationNotFoundError | 找不到服務器端加密配置 | |
| 400 Bad Request | TokenRefreshRequired | 必須更新令牌 | |
| 400 Bad Request | TooManyBuckets | 試圖創建的bucket超過了允許的數量 | |
| 400 Bad Request | UnexpectedContent | 該請求不支持內容 | |
| 400 Bad Request | UnresolvableGrantByEmailAddress | 提供的電子郵件地址與記錄中的任何帳戶都不匹配 | |
| 400 Bad Request | UserKeyMustBeSpecified | bucket post必須包含指定的字段名。如果已指定,請檢查字段的順序 | |
| 403 Forbidden | AccessDenied | 用戶沒有權限執行操作 | |
| 403 Forbidden | AllAccessDisabled | 已禁用對此S3資源的所有訪問 | |
| 403 Forbidden | InvalidPayer | 已禁用對此對象的所有訪問 | |
| 403 Forbidden | InvalidSecurity | 提供的安全憑據無效 | |
| 403 Forbidden | NotSignedUp | 帳戶沒有注冊相關服務 | |
| 403 Forbidden | InvalidObjectState | 該操作對于對象的當前狀態無效 | |
| 403 Forbidden | InvalidAccessKeyId | 訪問密鑰ID在我們的記錄中不存在 | |
| 403 Forbidden | AccountProblem | 帳戶有問題,導致操作無法成功完成 | |
| 403 Forbidden | CrossLocationLoggingProhibited | 不允許跨位置日志記錄。一個地理位置的bucket無法將信息記錄到另一個位置的bucket中 | |
| 403 Forbidden | RequestTimeTooSkewed | 請求的時間與服務器的時間相差太大 | |
| 403 Forbidden | SignatureDoesNotMatch | 系統計算的請求signature與提供的signature不匹配。檢查Access Key和簽名方法 | |
| 403 Forbidden | UserSuspended | 用戶已經被掛起 | |
| 404 Not Found | NoSuchBucket | 用戶請求的桶不存在 | |
| 404 Not Found | NoSuchUpload | UploadId不存在或者UploadId正在合并中 | |
| 404 Not Found | NoSuchLifecycleConfiguration | 桶中沒有配置生命周期管理信息 | |
| 404 Not Found | NoSuchKey | 指定的對象不存在 | |
| 404 Not Found | NoSuchBucketPolicy | 指定的Bucket沒有相應的策略 | |
| 404 Not Found | NoSuchVersion | 請求中指定的版本ID與現有版本不匹配 | |
| 405 Method Not Allowed | MethodNotAllowed | 指定的方法不允許操作在請求的資源上 | |
| 408 Request Timeout | RequestTimeout | 用戶與Server之間的socket連接在超時時間內沒有進行讀寫操作 | |
| 409 Conflict | BucketAlreadyExists | 當前請求的桶名已經被使用 | |
| 409 Conflict | BucketAlreadyOwnedByYou | 試圖創建的bucket已經存在且請求者是所有者 | |
| 409 Conflict | BucketNotEmpty | 請求的桶不為空 | 刪除桶前請先清空桶 |
| 409 Conflict | PositionNotEqualToLength | 請求參數中position的值與對象追加前的大小不一致 | |
| 409 Conflict | InvalidBucketState | 該請求對存儲桶的當前狀態無效 | |
| 409 Conflict | FileImmutable | 桶版本控制設置為enabled或suspended | |
| 409 Conflict | AccessPointAlreadyOwnedByYou | 您的帳戶中已存在同名的訪問點 | |
| 409 Conflict | ObjectNotAppendable | 無法追加指定的對象 | |
| 409 Conflict | OperationAborted | 當前正在對此資源執行沖突的條件操作 | |
| 409 Conflict | RestoreAlreadyInProgress | 對象還原進程已在進行中 | |
| 411 Length Required | MissingContentLength | 必須提供Content-Length HTTP頭 | |
| 412 Precondition Failed | PreconditionFailed | 至少有一個指定的前提條件不成立 | |
| 416 Client Requested Range Not Satisfiable | InvalidRange | Range指定的范圍不合法 | |
| 422 Unprocessable Entity | UnprocessableEntity | 請求格式正確,但是由于含有語義錯誤,無法響應 | |
| 500 Internal Server Error | InternalError | 系統遇到內部錯誤,請重試 | |
| 501 Not Implemented | NotImplemented | 提供的頭包含未實現的功能 | |
| 503 Service Unavailable | ServiceUnavailable | 服務不可用 | |
| 503 Service Unavailable | SlowDown | 請降低請求頻率 |