Troubleshooting

Last updated: 2020-05-27 14:29:12

    Overview

    If an SDK API call to request the COS service fails, an error message will be returned in the callback.

    Sample error

    cos.headBucket({
        Bucket='examplebucket-1250000000',
        Region: 'COS_REGION',     /* Bucket region. Required */
    },function (err,data) {
        if (err) {
            console.log(err.error);
        }
    });

    Client Exceptions

    Parameter Name Description Type
    err Object returned when an error (network error or service error) occurs. If the request is successful, this is null. For more information, see Error Codes Object
    - error Request error message Object/String

    Server exceptions

    Parameter Name Description Type
    err Object returned when an error (network error or service error) occurs. If the request is successful, this is null. For more information, see Error Codes Object
    - statusCode HTTP status code returned by the request, such as 200, 403, and 404 Number
    - headers Header information returned by the request Object
    - error Request error message Object/String
    errorCode Error code returned by the body when the request fails. For more information, see Error Codes. string
    errorMessage Error message returned by the body when the request fails. For more information, see Error Codes. string
    - - RequestId A unique ID of the request in the server request log that can be submitted in a ticket for troubleshooting String

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help