If an API call fails, the server returns an error message. This topic describes the error codes and their solutions.
Overview
If an API request fails, the server returns an error message. The error message contains an HTTP status code and a response body with specific error details. The format of the error details in the response body is as follows:
{
"errorCode" : <ErrorCode>,
"errorMessage" : <ErrorMessage>
}This topic provides guidance on how to handle errors. You can also find details about error codes in the API Error Center. For more information, see the Simple Log Service API Error Center.
Operation-specific error codes
Operation-specific error codes are unique to each API operation. For these error codes, see the documentation for the specific API operation.
Common error codes
Common error codes apply to most API operations. The following table describes the common error codes that may be returned in API error responses.
Simple Log Service provides common errors for log query and analysis to help you troubleshoot issues. For more information, see Common errors for log query and analysis.
HTTP status code | Error code | Error message | Description | Recommended actions |
400 | RequestTimeExpired | Request time requestTime has been expired while server time is server time. | The time difference between the request and the server exceeds 15 minutes. | Check the time on the client and retry the request later. |
400 | InvalidRequestTime | Request time requestTime not follow RFC822 spec. | The value of the Date header in the request does not comply with the RFC 822 standard. | Check the request header and confirm that the value of the Date header complies with the RFC 822 standard. |
400 | InvalidHost | Host header Host is invalid. | The Host header in the request is invalid. | Check the request header and confirm that the format of the Host header is correct. |
400 | ProjectAlreadyExist | Project ProjectName already exist. | The project name already exists. | Project names must be globally unique within an Alibaba Cloud region. Change the project name and retry the request. |
400 | PostBodyInvalid | The request body is not valid JSON object. | The request body is not in JSON format. | Adjust the request body and send the request again. |
400 | InvalidContentType | Content-Type type is unsupported. | The Content-Type is not supported. | Confirm that the Content-Type is correctly defined. |
400 | ParameterInvalid | Http extend authorization : authorization pair is invalid. | The authorization request header is invalid. | Confirm that the authorization request header is correctly defined. |
Http extend x-log-bodyrawsize : x-log-bodyrawsize pair is invalid. | The x-log-bodyrawsize request header is invalid. | Confirm that the x-log-bodyrawsize request header is correctly defined. | ||
Http extend x-log-compresstype : x-log-compresstype pair is invalid. | The x-log-compresstype request header is invalid. | Confirm that the x-log-compresstype request header is correctly defined. | ||
x-log-signaturemethod: x-log-signaturemethod pair is invalid. | The x-log-signaturemethod is invalid. | Confirm that the x-log-signaturemethod request header is correct. | ||
400 | MissingParameter | Missing query key : parameter. | A required request parameter is missing. | Add the missing request parameter and retry the request. For more information about the structure and generation process of a request signature, see Request signature. |
Missing http extend header key : authorization. | The authorization request header is missing. | Add the authorization request header and retry the request. For more information about the structure and generation process of a request signature, see Request signature. | ||
Missing http extend header key : x-log-bodyrawsize. | The x-log-bodyrawsize request header is missing. | Add the x-log-bodyrawsize request header and retry the request. For more information about the structure and generation process of a request signature, see Request signature. | ||
Missing http extend header key : x-log-date. | The x-log-date request header is missing. | Add the x-log-date request header and retry the request. For more information about the structure and generation process of a request signature, see Request signature. | ||
Missing http extend header key : x-log-signaturemethod. | The x-log-signaturemethod request header is missing. | Add the x-log-signaturemethod request header and retry the request. For more information about the structure and generation process of a request signature, see Request signature. | ||
401 | SignatureNotMatch | Signature signature not matched. | The digital signature of the request does not match. | Retry the request. If the error persists, replace the AccessKey and retry. Possible causes include the following:
For more information about the structure and generation process of a request signature, see Request signature. |
401 | Unauthorized | The AccessKeyId is unauthorized. | The provided AccessKey ID is not authorized. | Confirm that your AccessKey ID has permissions to access Simple Log Service. To grant a Resource Access Management (RAM) user permissions to perform operations on Simple Log Service, see Create a RAM user and grant permissions. |
The security token you provided is invalid. | The STS token is invalid. | Check your STS API request and confirm that the STS token is valid. | ||
The security token you provided has expired. | The STS token has expired. | Request a new STS token and send the request again. | ||
AccessKeyId not found: AccessKey ID | The AccessKey ID does not exist. | Check your AccessKey ID. Retrieve the correct AccessKey ID and send the request again. | ||
AccessKeyId is disabled: AccessKey ID | The AccessKey ID is disabled. | Check your AccessKey ID, confirm that it is enabled, and then send the request again. | ||
Your SLS service has been forbidden. | Simple Log Service has been disabled. | Check the status of your Simple Log Service. For example, check if your account has an overdue payment. | ||
The project does not belong to you. | The project does not belong to the current user. |
| ||
401 | InvalidAccessKeyId | The access key id you provided is invalid: AccessKey ID. | The AccessKey ID is invalid. | Check your AccessKey ID and confirm that it is valid. |
Your SLS service has not been activated. | Simple Log Service is not activated. | Log on to the Simple Log Service console or call an API operation to activate Simple Log Service. Then, send the request again. For more information, see What is Simple Log Service?. | ||
403 | WriteQuotaExceed | Write quota is exceeded. | The log write quota is exceeded. | Optimize the log write request to reduce the number of logs to write. For more information, see Limits. |
403 | ReadQuotaExceed | Read quota is exceeded. | The log read quota is exceeded. | Optimize the log read request to reduce the number of logs to read. For more information, see Limits. |
403 | MetaOperationQpsLimitExceeded | Qps limit for the meta operation is exceeded. | The default queries per second (QPS) threshold is exceeded. | Optimize the resource operation request to reduce the number of operations. We recommend that you retry the request after a few seconds. Simple Log Service limits the QPS for the following management API operations:
For more information, see Limits. |
403 | ProjectForbidden | Project ProjectName has been forbidden. | The project has been disabled. | Check the project status. Your project may be suspended due to an overdue payment. |
404 | ProjectNotExist | The Project does not exist : name | The project does not exist. | Check the project name and confirm that the project exists and the region is correct. |
405 | InvalidMethod | Invalid request method : request URI | The request method is not supported for the requested resource. | Check the values of method and retry. |
413 | PostBodyTooLarge | Body size bodysize must little than 10485760. | The request body cannot exceed 10 MB. | Adjust the size of the request body and retry the request. |
500 | InternalServerError | Internal server error message. | An internal server error occurred. | Retry the request later. |
500 | RequestTimeout | The request timed out. Please try again later. | The request timed out. | Retry the request later. |
503 | ServerBusy | The server is busy, please try again later. | The server is busy. | Retry the request later. |
The italicized text in an error message indicates specific information about the error. For example, in the ProjectNotExist error message, name is replaced with the actual project name.