Skip to content
大纲

错误码

在认证鉴权过程中常见的错误码有:

错误返回码错误消息状态码说明
AccessDeniedAccess denied.403 Forbidden无权限访问对应的资源。
InappropriateJSONThe JSON you provided was well-formed and valid, but not appropriate forthis operation.400 Bad Request请求中的JSON格式正确,但语义上不符合要求。如缺少某个必需项,或值类型不匹配等。出于兼容性考虑,对于所有无法识别的项应直接忽略,不应该返回这个错误。
InternalErrorWe encountered an internal error Please try again.500 Internal Server Error所有未定义的其他错误。在有明确对应的其他类型的错误时(包括通用的和服务自定义的)不应该使用。
InvalidAccessKeyIdThe Access Key ID you provided doesnot exist in our records.403 ForbiddenAccess Key ID不存在。
InvalidHTTPAuthHeaderThe Access Key ID you provided does notexist in our records.400 BadRequestAuthorization头域格式错误。
InvalidHTTPRequestThere was an error in the body of your HTTP request.400 Bad RequestHTTP body格式错误。例如不符合指定的Encoding等。
InvalidURICould not parse the specified URI.400 Bad RequestURI形式不正确。例如一些服务定义的关键词不匹配等。对于ID不匹配的问题,应定义更加具体的错误码,如NoSuchKey。
MalformedJSONThe JSON you provided was not well-formed.400 BadRequestJSON格式不合法。
InvalidVersionThe API version specified was invalid.404 NotFoundURI的版本号不合法。
OptInRequiredA subscription for the service is required.403 Forbidden没有开通对应的服务。
PreconditionFailedThe specified If-Match header doesn’tmatch the ETag header.412 PreconditionFailed详见Etag。
RequestExpiredRequest has expired. Timestamp date is <Data>400 BadRequest请求超时。要改成x-fos-date。若请求中只有Date,需将Date转成datetime。
IdempotentParameterMismatchThe request uses the same client token asa previous, but non-identical request.403 ForbiddenclientToken对应的API参数不一样。
SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check yourSecret Access Key and signing method. Consultthe service documentation for details.400 Bad RequestAuthorization头域中附带的签名和服务端验证不一致。