This topic describes the common error codes returned for the Log Service API.

If an error occurs when you send an API request to Log Service, Log Service will return an HTTP status code and error details. The error details are included in the HTTP response body in the following format:

{
"errorCode" : <ErrorCode>,
"errorMessage" : <ErrorMessage>
}

Among the error messages returned by Log Service, several error messages are specific to certain API requests. The others are applicable to most API requests. The following table lists the common error codes returned for the Log Service API. Error codes that are unique to API requests are described in the corresponding API operation.

Table 1. Common error codes
HTTP status code Error code Error message Description
411 MissingContentLength Content-Length does not exist in http header when it is necessary. The error message returned because the required Content-Length field does not exist in the request header.
415 InvalidContentType Content-Type {type} is unsupported. The error message returned because the specified Content-Type is not supported.
400 MissingContentType Content-Type does not exist in http header when body is not empty. The error message returned because the HTTP request body is not empty, but the Content-Type header field is not specified.
400 MissingBodyRawSize x-log-bodyrawsize does not exist in header when it is necessary. The error message returned because the required x-log-bodyrawsize field does not exist in the request header in the compression scenario.
400 InvalidBodyRawSize x-log-bodyrawsize is invalid. The error message returned because the value of the x-log-bodyrawsize field is invalid.
400 InvalidCompressType x-log-compresstype {type} is unsupported. The error message returned because the compression type that is specified in the x-log-compresstype field is not supported.
400 MissingHost Host does not exist in http header. The error message returned because the Host field does not exist in the HTTP request header.
400 MissingDate Date does not exist in http header. The error message returned because the Data field does not exist in the HTTP request header.
400 InvalidDateFormat Date {date} must follow RFC822. The error message returned because the value of the Date field in the request header does not comply with the RFC 822 standard.
400 MissingAPIVersion x-log-apiversion does not exist in http header. The error message returned because the x-log-apiversion field does not exist in the HTTP request header.
400 InvalidAPIVersion x-log-apiversion {version} is unsupported. The error message returned because the value of the x-log-apiversion header field is invalid.
400 MissAccessKeyId x-log-accesskeyid does not exist in header. The error message returned because no AccessKey ID exists in the Authorization header field.
401 Unauthorized The AccessKeyId is unauthorized. The error message returned because the specified AccessKey ID is invalid.
400 MissingSignatureMethod x-log-signaturemethod does not exist in http header. The error message returned because the x-log-signaturemethod header field does not exist.
400 InvalidSignatureMethod signature method {method} is unsupported. The error message returned because the signature method that is specified in the x-log-signaturemethod header field is not supported.
400 RequestTimeTooSkewed Request time exceeds server time more than 15 minutes. The error message returned because the request sending time is more than 15 minutes before or after the current server time.
404 ProjectNotExists Project {name} does not exist. The error message returned because the specified project does not exist.
401 SignatureNotMatch Signature {signature} is not matched. The error message returned because the digital signature of the request that is calculated by the client does not match the signature calculated by the server.
403 WriteQuotaExceed Write quota is exceeded. The error message returned because the log write quota is exceeded.
403 ReadQuotaExceed Read quota is exceeded. The error message returned because the log read quota is exceeded.
500 InternalServerError Internal server error message. The error message returned because an internal server error occurred.
503 ServerBusy The server is busy, please try again later. The error message returned because the server is busy. Try again later.

The {...} in error messages indicates specific error information. For example, {name} in the ProjectNotExist error message is replaced by a specific project name.