tencent cloud

Cloud Object Storage

Troubleshooting

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2024-02-04 17:20:25

Overview

If an SDK API call to request the COS service fails, the system will return the error information in the callback.

Sample error

cos.headBucket({
Bucket: 'examplebucket-1250000000',
Region: 'ap-beijing',
}, function(err, data) {
if (err) {
console.log(err.error);
}
});

Client Exceptions

Parameter
Description
Type
err
Error code, which is returned when an error (network error or service error) occurs. If the request is successful, this parameter is empty. For more information, please see Error Codes.
Object
- error
Error message for the request
Object/String

Server Exceptions

Parameter
Description
Type
err
Error code, which is returned when an error (network error or service error) occurs. If the request is successful, this parameter is empty. For more information, please see Error Codes.
Object
- statusCode
HTTP status code returned by the request, such as 200, 403, and 404
Number
- headers
Headers
Object
- error
Error information
Object/String
- - Code
Error code returned by the body when the request fails. For more information, see Error Codes
String
- - Message
Error message returned by the body when the request fails. For more information, see Error Codes
String
- - RequestId
Unique ID of the request in the server request log that can be submitted in a ticket for troubleshooting
String

Using the Diagnosis Tool

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

Directions

1. Copy the request ID (RequestId) returned when the request error occurs.
2. Click Diagnosis Tool.

3. Enter RequestId and click Diagnose.
4. Wait and view the diagnostic result.

FAQs

If you have any questions about the SDK for WeChat Mini Program, see the SDK for WeChat Mini Program section in FAQs.

Ajuda e Suporte

Esta página foi útil?

comentários