pub enum TencentCloudError {
Network(Error),
Json(Error),
Api {
code: String,
message: String,
request_id: Option<String>,
},
Auth(String),
Config(String),
Parameter(String),
Signature(String),
Timeout(String),
Other(String),
}
Expand description
Main error type for TencentCloud SDK operations
Variants§
Network(Error)
Network-related errors
Json(Error)
JSON serialization/deserialization errors
Api
API errors returned by TencentCloud
Fields
Auth(String)
Authentication errors
Config(String)
Configuration errors
Parameter(String)
Parameter validation errors
Signature(String)
Signature generation errors
Timeout(String)
Timeout errors
Other(String)
Generic errors
Implementations§
Source§impl TencentCloudError
impl TencentCloudError
Sourcepub fn api_with_request_id<S: Into<String>>(
code: S,
message: S,
request_id: Option<S>,
) -> Self
pub fn api_with_request_id<S: Into<String>>( code: S, message: S, request_id: Option<S>, ) -> Self
Create a new API error with request ID
Sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Get request ID if available
Sourcepub fn is_api_error(&self, error_code: &str) -> bool
pub fn is_api_error(&self, error_code: &str) -> bool
Check if this is a specific API error code
Sourcepub fn is_network_error(&self) -> bool
pub fn is_network_error(&self) -> bool
Check if this is a network error
Sourcepub fn is_timeout_error(&self) -> bool
pub fn is_timeout_error(&self) -> bool
Check if this is a timeout error
Trait Implementations§
Source§impl Debug for TencentCloudError
impl Debug for TencentCloudError
Source§impl Display for TencentCloudError
impl Display for TencentCloudError
Source§impl Error for TencentCloudError
impl Error for TencentCloudError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for TencentCloudError
impl From<Error> for TencentCloudError
Auto Trait Implementations§
impl Freeze for TencentCloudError
impl !RefUnwindSafe for TencentCloudError
impl Send for TencentCloudError
impl Sync for TencentCloudError
impl Unpin for TencentCloudError
impl !UnwindSafe for TencentCloudError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more