CosXmlClientException
(client exception) or CosXmlServiceException
(server exception).CosXmlClientException
, results from unexpected interaction issues between the client and the COS server, such as a failure to connect to the server, a failure to parse the data returned by the server, or the occurrence of an IO exception when reading a local file.CosXmlServiceException
, occurs when the client interacts with the COS server normally, but the operation fails. For example, the client accesses a bucket that does not exist, deletes a file that does not exist, or does not have the permission to perform an operation.CosXmlClientException
contains the defined client error code and specific error message, such as local file IO exception. After such an exception is captured, we recommend that you print out the entire exception as it contains necessary factors for troubleshooting. The following describes the member variables of the exception:Member | Description | Type |
errorCode | Client error code, such as 10000, which indicates a parameter verification failure. For more information, see Error Codes | int |
message | Client error message | string |
CosXmlServiceException
, occurs when, for example, the client accesses a bucket that does not exist, deletes a file that does not exist, or does not have the permission to perform an operation, etc. CosXmlServiceException
contains the status code returned by the server, the requestid
, the error details, and so on. After an exception is captured, we recommend that you print out the entire exception as it contains necessary factors for troubleshooting. The member variables of exception are described as follows:Member | Description | Type |
requestId | Request ID, used to identify a request. It is very important for troubleshooting. | string |
statusCode | Status code in the response. A 4XX status code represents a request failure caused by the client, and a 5XX status code represents a failure caused by a server exception. For more information, see Error Codes. | string |
errorCode | string | |
errorMessage | string |
RequestId
) returned when the request error occurs.RequestId
and click Diagnose.
Was this page helpful?