tencent cloud



Last updated: 2022-05-25 15:22:41

    When the SDK request fails, the error field returned is not empty, but instead includes an error code, error description, and other necessary debugging information to help developers quickly fix any issues. Error codes (outlined in the returned error field) include those returned by the client and those returned by the server.

    Client Errors

    • Error codes generated by your device due to network problems are all 4-digit negative numbers, such as -1001. These error codes are defined by Apple. For more information, see the definitions presented in the header file NSURLError.h in Foundation framework or see Apple's official documentation.
    • Custom errors returned by the local client in the SDK network layer includes network exception, invalid certificate and invalid parameter, which is as shown below:
    Error Code Error Message Error Description
    10000 InvalidArgument Invalid parameter
    10001 InvalidCredentials Invalid certificate
    10004 UnsupportOperation Unsupported operation
    20001 InvalidArgument Invalid data returned by the server
    20004 PoorNetwork A verification for data integrity failed.
    30000 UserCancelled The user has canceled the request.
    30002 AlreadyFinished The job has already finished.

    Server Errors

    Error codes returned by COS are based on HTTP status codes, such as 404 and 503. For more information on these error codes, see Error Codes. You can also use the self-diagnosis tool to debug the code and quickly locate request errors.

    Using the Diagnosis Tool

    COS provides a self-help diagnosis tool to help you quickly locate request errors and debug the code.


    1. Copy the RequestId returned by the exception by following directions in Obtaining RequestId.
    2. Click Diagnosis Tool.
      Diagnosis Tool
      Click to start diagnosis
      Enter `RequestId` for intelligent diagnosis and obtain basic request information, directions, and diagnosis information to quickly locate request errors.
    3. Enter RequestId and click Diagnose.
    4. Wait and view the diagnostic result.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support