CDN加速

错误响应消息

更新时间:2021-06-17 14:15:22

公共错误码列表

在向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.

鉴权中缺少ak

400 Bad Request

AuthorizationHeaderMalformed

The authorization header is malformed; a non-empty Access Key (AKID) must be provided in the credential.

鉴权中ak有误 ,在WCS系统中不存在

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”头部

400 Forbidden

AccessDenied

Access Denied

AK/SK不匹配

403 Forbidden

AccessDenied

Access Denied

凭证过期

400 Bad Request

ExpiredToken

The provided token has expired.

其他场景

空间挂起、无效、已删除时

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

InvalidArgument

XXX must be formated via ISO8601 Long format

URI有误

400 Bad Request

InvalidURI

Couldn't parse the specified URI.

XML格式错误

400

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 Server 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.

错误响应消息格式

错误响应消息头

当错误发生时,消息头中都会包含:

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>