tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Troubleshooting

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-02-29 17:31:27

Overview

When calling the SDK to request the COS or CI service fails, all exceptions reported are RuntimeExcpetion. Common exceptions in the SDK currently include CosClientException, CosServiceException, CIServiceException, and IllegalArgumentException.

Client Exceptions

CosClientException 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. Inherited from RuntimeException, CosClientException has no custom member variables, and is used in the same way as RuntimeException.

Server Exceptions

CosServiceException and CIServiceException refer to scenarios where the interaction is completed 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 the operation, or the server fails. CosServiceException contains the status code, request ID, and error details. After such an exception is captured, we recommend you print out the entire exception as it contains necessary factors for troubleshooting. The following describes the member variables of the exception:
Request Element
Description
Type
requestId
Request ID, which is used to identify a request and is very important for troubleshooting.
String
traceId
ID for troubleshooting
String
statusCode
Status code in the response. 4xx indicates that the request failed due to a client exception. 5xx indicates that the request failed due to a server exception. For more information, see Error Codes.
String
errorType
Enumeration type, indicating the type of exception, such as Client, Service, and Unknown.
ErrorType
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

Using the Diagnosis Tool

CI provides a self-help diagnosis tool to help you quickly locate request errors and debug the 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 Java SDK, see FAQs.


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan