更新时间:2025-08-18 15:46:38
当向 WOS 组件发出请求时,若遇到错误,响应将包含详细的错误码和描述信息,便于定位和排查问题。
| Sitiuation | HTTP Status Code | Error Code | Message |
|---|---|---|---|
| 带host头部的值不合法 | 403 Forbidden | InvalidURI | Couldn’t parse the specified URI. |
| 未带鉴权authorization头部 | 403 Forbidden | AccessDenied | Access Denied |
| 签名带合法date,头部缺少date或不合法 | 403 Forbidden | AccessDenied | Authentication requires a valid Date or x-wos-date header |
| 鉴权串不匹配 例如: 1.签名中缺少date或不合法,头部有带date 2.头部和签名都缺少date或给的值不合法 3.签名中带了date,而请求头部定义的是x-amz-date 4. 头部和鉴权中带的content-type值不同 |
403 Forbidden | SignatureDoesNotMatch | The request signature we calculated does not match the signature you provided. Check your key and signing method. |
| Credential问题(日期错误) | 400 Bad Request | InvalidArgument | Invalid credential date. Date is not the same as x-wos-date. |
| regionName不正确 | 400 Bad Request | AuthorizationHeaderMalformed | The authorization header is malformed; the region ‘ap-northeast-1’ is wrong; expecting ‘ap-south-1’ |
| 鉴权中缺少ak | 400 Bad Request | AuthorizationHeaderMalformed | The authorization header is malformed; a non-empty Access Key (AKID) must be provided in the credential. |
| 鉴权中ak有误,在CDNetworks对象存储系统中不存在 | 403 Forbidden | InvalidAccessKeyId | The Access Key Id you provided does not exist in our records. |
| 鉴权内容缺少签名串 | 400 Bad Request | InvalidArgument | Authorization header is invalid. Expected AccessKeyId:signature |
| 鉴权算法有误,当前只支持WOS-HMAC-SHA256(大小写敏感,只允许大写字母) | 400 Bad Request | InvalidArgument | Only AWS4-HMAC-SHA256 is supported |
| 未携带正确的“Authorization”头部 | 403 Forbidden | AccessDenied | Access Denied |
| AK/SK不匹配、未授权的子账号操作 | 403 Forbidden | AccessDenied | Access Denied |
| 凭证过期 | 400 Bad Request | ExpiredToken | The provided token has expired. |
| 无服务订单 | 403 Forbidden | AccessDenied | Standard storage service in CHINA not enabled |
| 空间挂起、无效、已删除时 | 409 Conflict | InvalidBucketState | The request is not valid with the current state of the bucket. |
| 帐号禁用 | 403 Forbidden | AccountProblem | There is a problem with your account that prevents the operation from completing successfully. |
| 请求时间Date或者x-wos-date格式不正确 | 400 Bad Request | InvalidArgument | XXX must be formated via ISO8601 Long format |
| URI有误 | 400 Bad Request | InvalidURI | Couldn’t parse the specified URI. |
| XML格式错误 | 400 Bad Request | MalformedXML | The XML you provided was not well-formed or did not validate against our published |
| 请求内容为空 | 400 Bad Request | MissingRequestBodyError | Request body is empty. |
| MD5值不一致 | 400 Bad Request | BadDigest | The Content-MD5 you specified did not match what we received. |
| MD5值无效 | 400 Bad Request | InvalidDigest | The Content-MD5 you specified is not valid. |
| 空间不存在 | 404 Not Found | NoSuchBucket | The specified bucket does not exist. |
| 对象不存在 | 404 Not Found | NoSuchKey | The specified key does not exist. |
| 服务异常 | 500 Internal Error | InternalError | We encountered an internal error. Please try again. |
| 请求超时 | 400 Bad Request | RequestTimeout | Your socket connection to the server was not read from or written to within the timeout period. |
| 客户端本地时间与OSS服务器相差超15分钟 | 403 Forbidden | RequestTimeTooSkewed | The difference between the request time and the server’s time is too large. |
| max-uploads参数值为负数 | 400 Bad Request | InvalidArgument | Argument maxUploads must be an integer between 0 and 1000 |
| max-uploads非数字 | 400 Bad Request | InvalidArgument | Provided max-uploads not an integer or within integer range |
| max-uploads数字大于1000 | 400 Bad Request | InvalidArgument | Argument maxUploads must be an integer between 0 and 1000 |
| max-parts值不是1-1000的有效值 | 400 Bad Request | InvalidArgument | Argument maxParts must be an integer between 0 and 1000 / Provided maxParts not an integer or within integer range |
| max-parts非数字 | 400 Bad Request | InvalidArgument | Provided max-uploads not an integer or within integer range |
| Content-MD5值无效/不合法 | 400 Bad Request | InvalidDigest | The Content-MD5 you specified is not valid. |
| Content-MD5值和实际文件MD5值不匹配 | 400 Bad Request | BadDigest | The Content-MD5 you specified didnot match what we received. |
| post请求没有携带文件内容 | 400 Bad Request | InvalidArgument | POST requires exactly one file upload per request. |
| 文件名key未指定 | 400 Bad Request | InvalidArgument | Bucket POST must contain a field named ‘key’. If it is specified, please check the order of the fields. |
| post上传请求的 content-type 必须为 multipart/form-data | 400 Bad Request | InvalidArgument | Content-Type of Bucket Post must be multipart/form-data |
| 文件大小超过5G | 400 Bad Request | MaxPostPreDataLengthExceededError | Your POST request fields preceding the upload file were too large. |
| 分片上传的uploadId不存在 | 404 Not Found | NoSuchUpload | The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed. |
| CompleteMultipartUpload中给的分块etag值不对 | 400 Bad Request | InvalidPart | One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part’s entity tag. |
| 分片上传合成文件操作未携带块信息 | 400 Bad Request | InvalidRequest | You must specify at least one part. |
| GetBucket接口指定的max-keys必须为0-2147483647的整数 | 400 Bad Request | InvalidArgument | Argument maxKeys must be an integer between 0 and 2147483647. |
| GetBucket接口指定的max-keys必须为正整数 | 400 Bad Request | InvalidArgument | Provided max-keys not an integer or within integer range. |
| format参数名有误或缺少 | 400 | InvalidArgument | The format param submitted is incorrect. |
| param下非format参数名有误 | 400 | InvalidArgument | The xxx param submitted is incorrect. |
| 非format参数值有误 | 400 | InvalidArgument | Property xxx invalid,the value is abc not match abcde. |
| 解压缩等任务不覆盖同名文件,但目标文件已存在时 | 409 Conflict | InvalidArgument | Target file already exists. |
当错误发生时,消息头中都会包含:
Content-Type: application/xml
对应的 3xx, 4xx, 或 5xx HTTP 状态码
错误响应消息体
响应的消息体中同样会包含对错误的描述信息。下面的错误响应示例展示了所有REST错误响应中公共的元素:
<?xml version="1.0" encoding="UTF-8"?><Error><Code>NoSuchKey</Code><Message>The resource you requested does not exist</Message><Resource>/example-bucket/object</Resource><RequestId>001B21A61C6C0000013402C4616D5285</RequestId></Error>