Error response format
If an exception occurs when Photo and Drive Service (PDS) processes a request, PDS SDK returns an error response in the following format:
{
"Message": "The input parameter file_id is not valid.",
"RequestId": "772328B2-E5F4-453C-9C23-CCCCCCCC",
"Code": "InvalidParameter"
}The HTTP status code varies based on the error type. Parameter description:
Code: the error code that indicates the error type.
Message: the error message that indicates the cause and solution of the error.
RequestId: the unique ID of the request. If the error is returned for an API call, the request ID is returned in the HTTP header x-ca-request-id.
In a few scenarios, an error is reported by API Gateway. In this case, an error response is returned in the following format:
x-ca-error-code: D504TO
x-ca-error-message: timeout
x-ca-request-id: 772328B1-E5F4-453C-9C23-CCCCCCCCParameter description:
x-ca-error-code: the error code that indicates the error type.
x-ca-error-message: the error message that indicates the cause and solution of the error.
x-ca-request-id: the unique ID of the request.
Common error codes
The following table describes the common error codes that cover most errors. Description:
The {parameter_name} and {resource_name} parameters correspond to the parameter name and resource type in the actual response.
Codes in the HTTP status code column are the HTTP status codes of the response.
The information in the Message column is the error message in the response. In an actual response, the {parameter_name} and {resource_name} parameters are replaced with the specific parameter name and resource type.
HTTP status code | Code | Message |
400 | InvalidParameter | The input parameter {parameter_name} is not valid. |
400 | InvalidParameterEmpty | The input parameter {parameter_name} is empty. |
400 | InvalidParameterWrongFormat | The input parameter {parameter_name} has invalid format. |
400 | InvalidRequestJSONFormat | The input parameter {parameter_name} is invalid Json format. |
400 | InvalidParameterNotSupported | The input parameter {parameter_name} is not supported. |
400 | InvalidParameterMissing | The input parameter {parameter_name} is missing. |
400 | InvalidParameterNotMatch | The input parameter {parameter_name} does not match. |
400 | InvalidParameterOutOfRange | The input parameter {parameter_name} does not match the limitation. |
400 | InvalidParameterExpired | The input parameter {parameter_name} is expired. |
400 | QuotaExhausted | The resource {resource_name} has exceeded the limit. |
400 | InvalidResource | The resource {resource_name} is not valid. |
400 | NotEmpty | The resource {resource_name} is not empty. |
404 | InvalidResourceIsEmpty | The resource {resource_name} is empty. |
400 | InvalidResourceUnsupported | The resource {resource_name} is not supported. |
404 | NotFound | The resource {resource_name} cannot be found. |
400 | AlreadyExist | The resource {resource_name} has already exists. |
403 | Forbidden | User not authorized to operate on the specified APIs. |
403 | ForbiddenNoPermission | No Permission to access resource {resource_name}. |
403 | ForbiddenAccountNotFound | The specified account does not exist. |
403 | ForbiddenAccountInDebt | The specified account is in debt. |
403 | ForbiddenServiceRole | Cannot access specified service role. |
403 | ForbiddenRiskControl | This operation is forbidden by Alibaba Cloud RiskControl system. |
403 | ForbiddenFileInTheRecycleBin | This operation is forbidden for file in the recycle bin. |
400 | StateConflict | User operation is not valid. Please try again later. |
500 | InternalError | The request has been failed due to some unknown error. Please try again later. |
405 | HTTPMethodNotAllowed | The request http method is not supported for this resource. Please refer to document. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. Please try again later. |
400 | Throttling | The operation is blocked due to throttling control. |
400 | IncorrectStatus | The current status does not support this operation. |
400 | InvalidHeader | Header {header_name} is not valid. |
400 | SignatureDoesNotMatch | SignatureDoesNotMatch. |
400 | DriveRelativePathNested | The input parameter relative_path nested inside of another relative_path: {path}. |
400 | Sha1Conflict | Find multiple objects of the same sha1. |
400 | ReadBodyError | Read body error. |