Error handling
Updated at:2025-10-27
The Go language identify errors with the error type. IAM supports two types of errors as shown in the table below:
| Error type | Description |
|---|---|
| BceClientError | Errors caused by user operations |
| BceServiceError | Errors returned by the IAM service |
Client exception
A client exception arises when the client encounters issues while sending requests or transmitting data to IAM. For example, network failures or I/O errors during file uploads will result in a BceClientError.
Server exception
When the IAM service encounters exceptions, it returns corresponding error messages to users for troubleshooting. For common server exceptions, refer to IAM Error Response
