Exception handling
Updated at:2025-10-16
System exceptions
EIP system exception prompts are available in the following three ways:
| Exception type | Description |
|---|---|
| BceHttpClientError | Exceptions thrown during retry |
| last_error | Exceptions thrown at last retry |
| BceClientError | Exceptions generated by the client |
| BceInvalidArgumentError | Exceptions generated by parameter transmission |
| BceServerError | Exceptions generated by the server |
Users can use try to obtain the exception generated by a certain event:
Python
1from baidubce import exception
2from baidubce.services import eip
3try:
4 eip_client.list_eips()
5except exception.BceHttpError as e:
6 print e.message
Client exception
A client exception occurs when the client faces issues during request transmission or file uploads to EIP. For example, a BceHttpClientError is thrown for network failures or I/O errors.
Server exception
A server exception is generated when BOS server-side errors occur. The service returns detailed error messages to assist troubleshooting. For common server exceptions, refer to EIP Error Code
