If an error occurs when you access OSS, OSS returns the error code and error message so that you can identify and rectify the error.
Response message body
If an error occurs when you access OSS, OSS returns HTTP status code 3xx, 4xx, or 5xx and a message body in the application/xml format.
Example of the message body of an error response:
<? xml version="1.0" ? > <Error xmlns=”http://doc.oss-cn-hangzhou.aliyuncs.com”> <Code> AccessDenied </Code> <Message> Query-string authentication requires the Signature, Expires and OSSAccessKeyId parameters </Message> <RequestId> 1D842BC54255**** </RequestId> <HostId> oss-cn-hangzhou.aliyuncs.com </HostId> </Error>
The message body of an an error response includes the following elements:
- Code: the error code that OSS returns to the user.
- Message: the detailed error message provided by OSS.
- RequestId: the UUID that uniquely identifies a request. If you need help from OSS development engineers to handle an exception, provide them with the RequestId.
- HostId: the ID of the host in the accessed OSS cluster, which is the same as the host ID specified in the request.
For more information about OSS error codes, see OSS error center.
HTTP status code 203
|CallbackFailed||Callback to application server failed, please check your callbackUrl.||The error message returned because callback parameters are incorrectly configured or in invalid formats. For example, upload callback fails because the callback parameters within the ArgumentValue is not in the valid JSON format.||See Upload callback errors and troubleshooting to find detailed solutions.|
HTTP status code 400
|InvalidBucketName||The specified bucket is not valid.||The error message returned because the bucket name is invalid.||See Bucket to learn the bucket naming conventions and then check the bucket name.|
|InvalidObjectName||The Object name can not be empty.||The error message returned because the object name is invalid.||See Object to learn the object naming conventions and then check the object name.|
|InvalidObjectName||The Length of Object name must be less than 1024.|
|TooManyBuckets||You have attempted to create more buckets than allowed.||An Alibaba Cloud account can create up to 100 buckets in a region.||To adjust the limit, submit a ticket.|
|RequestIsNotMultiPartContent||Bucket POST must be of the enclosure-type multipart/form-data.||The error message returned because the Content-Type header in the PostObject request
||The form submitted by the PostObject operation must be encoded in the
|RequestTimeout||Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.||The error message returned because the request times out due to network environment or configurations.||See Network connection timeout handling to handle problems.|
|NotImplemented||A header you provided implies functionality that is not implemented.||The error message returned because invalid parameters are passed when the API is encapsulated.||See API overview and configure valid parameters.|
|InvalidArgument||Invalid Argument Parameter is invalid.||The error message returned because the parameter format is invalid.|
|MaxPOSTPreDataLengthExceededError||Your POST request fields preceding the upload file were too large.||The error message returned because size of the object uploaded by PostObject is larger than 5 GB.||See PostObject errors and troubleshooting to handle the problem.|
|FieldItemTooLong||Your name of form field is too long.||The error message returned because the total length of the form fields in the POST request exceeds the limit. Only the file form field can be larger than 4 KB in size.|
|MalformedPOSTRequest||The body of your POST request is not well-formed multipart/form-data.||The error message returned because the format of the form field is invalid.|
|InvalidPolicyDocument||Invalid policy document, please check.||The error message returned because the policy format in the PostObject request is invalid.|
|IncorrectNumberOfFilesInPOSTRequest||POST requires exactly one file upload per request.||The error message returned because the number of objects in the PostObject request is invalid. A PostObject request can contain only one file form field.|
|EntityTooSmall||Your proposed upload smaller than the minimum allowed size.||Post policy is configured to specify the valid values of form fields when PostObject
is called to upload files. For example,
|EntityTooLarge||Your proposed upload exceeds the maximum allowed size.|
|EntityTooLarge||Source object Length exceeds the maximum allowed size.|
|MalformedXML||The XML you provided was not well-formed or did not validate against our published schema.||The error message returned because the XML format in the request is invalid.||See the following topics to handle the problems based on requests:|
|InvalidTargetBucketForLogging||Put bucket log requester is not target bucket owner.||The error message returned because the destination bucket specified to store logs does not exist.||Specify a valid destination bucket.|
|InvalidPart||One or more of the specified parts could not be found or the specified entity tag might not have matched the part's entity tag.||The error message returned because a part uploaded by CompleteMultipartUpload is invalid due to invalid PartNumber or ETag.||For more information about troubleshooting, see CompleteMultipartUpload.|
|FilePartNotExist||The Part you read had been deleted.||The error message returned because a part submitted by CompleteMultipartUpload is deleted.|
|InvalidPartOrder||The list of parts was not in ascending order.||The error message returned because the parts submitted by CompleteMultipartUpload are not in ascending order of PartNumber.|
|InvalidPartOrder||Part number must be an integer between 1 and 10000, inclusive.||The error message returned because the part sequence is invalid.|
|InvalidEncryptionAlgorithmError||The encryption algorithm specified is not valid.||The error message returned because the specified value of x-oss-server-side-encryption is invalid. Valid values: AES256 and KMS.||See PutObject to handle the problem.|
|InvalidDigest||The Content-MD5 you specified was invalid.||The error message returned because the digest is invalid, and the specified MD5 checksum value does not match the MD5 hash of the object.|
|InvalidTargetType||The symbolic's target file type is invalid.||The error message returned because the object is a symbolic link and the object that the link points to is also a symbolic link.||Ensure that the symbolic link does not point to another symbolic link.|
HTTP status code 403
|AccessDenied||AccessDenied||The error message returned because you do not have access permissions.||For more information, see OSS permission.|
|InvalidAccessKeyId||The OSS Access Key Id you provided is disabled.||The error message returned because the AccessKey ID does not exist or is invalid.||See OSS 403 to handle the problem.|
|InvalidAccessKeyId||The OSS Access Key Id you provided does not exist in our records.|
|InvalidAccessKeyId||The OSS Access Key Id contains non-acceptable characters, which accepts only alphanumeric characters[0-9a-zA-Z] and several special characters[. _=]|
|SignatureDoesNotMatch||The request signature we calculated does not match the signature you provided.||The error message returned because a signature error occurs.||See FAQ to handle the problem.|
|RequestTimeTooSkewed||The difference between the request time and the current time is too large.||The error message returned because the time when the request is initiated is 15 minutes before the current time of the OSS server.||See OSS 403 to handle the problem.|
|ImageDamage||The image file may be damaged.||The error returned because the image is partially lost or damaged so that the image cannot be recognized or processed.|
|UserDisable||UserDisable||The error message returned because the account is deactivated due to overdue payment or security reasons.||Check whether you have overdue payment or contact technical support to perform a security check.|
|AccessForbidden||CORSResponse: This CORS request is not allowed. This is usually because the evalution of Origin, request method / Access-Control-Request-Method or Access-Control-Requet-Headers are not whitelisted by the resource's CORS spec.||The error message returned because CORS is not configured or the CORS configuration is incorrect.||See Configure CORS rules to handle the problem.|
|InvalidObjectState||The operation is not valid for the object's state.||When you download an Archive object, the state of the object is invalid in the following
||See RestoreObject to handle the problem.|
HTTP status code 404
|SymlinkTargetNotExist||The symlink target object does not exist.||The error message returned because of different reasons in different scenarios.
||Use the following methods to identify the problem:
|NoSuchBucket||The specified bucket does not exist.|
|NoSuchKey||The specified key does not exist.|
|NoSuchUpload||The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.|
HTTP status code 405
|MethodNotAllowed||The specified method is not allowed against this resource.||The error message returned because the method used to access OSS resources is not supported.||Use the methods described in API overview to access OSS resources.|
HTTP status code 409
|BucketAlreadyExists||The requested bucket name is not available.||The error message returned because the specified bucket already exists or is owned by another user.||Specify another name for the bucket that you want to create.|
|BucketNotEmpty||The bucket you tried to delete is not empty.||The error message returned because the bucket to delete contains objects that are not deleted or incomplete multipart upload tasks.||See DeleteBucket to handle the problem.|
|ObjectNotAppendable||The object is not appendable.||The error message returned because the object is not an append object.||OSS objects can be categorized into three types based on the upload method: normal objects, append objects, and multipart objects. The AppendObject operation can be performed only on append objects.|
|PositionNotEqualToLength||Position is not equal to file length.||
||You can obtain the position for the next operation from the response header
See AppendObject to handle the problem.
|FileImmutable||The object you specified is immutable.||The error message returned because the object that you want to delete or modify is protected.||Ensure that the object to delete or modify is not protected.
See GetBucketWorm to handle the problem.
HTTP status code 411
|MissingContentLength||You must provide the Content-Length HTTP header.||The error message returned because the request does not use chunked encoding and does not contain the Content-Length header.||Ensure that the request use chunked encoding and contain the Content-Length header.|
HTTP status code 412
|PreconditionFailed||At least one of the pre-conditions you specified did not hold.||The error message returned because the object to download does not meet the specified
||See GetObject to handle the problem.|
HTTP status code 503
|DownloadTrafficRateLimitExceeded||Please reduce your upload request traffic.||The error message returned because the downloading traffic exceeds the limit.||The default limit of the downloading traffic over the Internet and internal networks is 5 Gbit/s. To adjust the limit, submit a ticket.|
|UploadTrafficRateLimitExceeded||Please reduce your upload request traffic.||The error message returned because the uploading traffic exceeds the limit.||The default limit of the uploading traffic through the Internet and internal networks is 5 Gbit/s. To adjust the limit, submit a ticket.|
|MetaOperationQpsLimitExceeded||Qps limit for the meta operation is exceeded.||The error message returned because the QPS exceeds the default limit.
OSS limits the QPS for the following API operations:
|We recommend that you perform the operation again after a few seconds.|
Common errors and troubleshooting
Appendix: Unsupported parameters in supported operations
If parameters not supported by OSS are added to the request for the object supported by OSS (for example, the If-Modified-Since parameter is added to the PUT operation request), OSS returns 400 Bad Request.
PUT /abc.zip HTTP/1.1 Host: bucketname.oss-cn-shanghai.aliyuncs.com Accept: */* Date: Thu, 11 Aug 2016 01:44:50 GMT If-Modified-Since: Thu, 11 Aug 2016 01:43:51 GMT Content-Length: 363
HTTP/1.1 400 Bad Request Server: AliyunOSS Date: Thu, 11 Aug 2016 01:44:54 GMT Content-Type: application/xml Content-Length: 322 Connection: keep-alive x-oss-request-id: 57ABD896CCB80C366955187E x-oss-server-time: 0 <? xml version="1.0" encoding="UTF-8"? > <Error> <Code>NotImplemented</Code> <Message>A header you provided implies functionality that is not implemented. </Message> <RequestId>57ABD896CCB80C366955****</RequestId> <HostId>bucketname.oss-cn-shanghai.aliyuncs.com</HostId> <Header>If-Modified-Since</Header> </Error>