#[non_exhaustive]pub struct DescribeAccountAuditConfigurationError {
pub kind: DescribeAccountAuditConfigurationErrorKind,
/* private fields */
}
Expand description
Error type for the DescribeAccountAuditConfiguration
operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: DescribeAccountAuditConfigurationErrorKind
Kind of error that occurred.
Implementations§
source§impl DescribeAccountAuditConfigurationError
impl DescribeAccountAuditConfigurationError
sourcepub fn new(kind: DescribeAccountAuditConfigurationErrorKind, meta: Error) -> Self
pub fn new(kind: DescribeAccountAuditConfigurationErrorKind, meta: Error) -> Self
Creates a new DescribeAccountAuditConfigurationError
.
sourcepub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
pub fn unhandled(err: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self
Creates the DescribeAccountAuditConfigurationError::Unhandled
variant from any error type.
Examples found in repository?
src/operation_deser.rs (line 10087)
10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133
pub fn parse_describe_account_audit_configuration_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DescribeAccountAuditConfigurationOutput,
crate::error::DescribeAccountAuditConfigurationError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::DescribeAccountAuditConfigurationError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DescribeAccountAuditConfigurationError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InternalFailureException" => crate::error::DescribeAccountAuditConfigurationError {
meta: generic,
kind:
crate::error::DescribeAccountAuditConfigurationErrorKind::InternalFailureException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::internal_failure_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_failure_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DescribeAccountAuditConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::DescribeAccountAuditConfigurationError {
meta: generic,
kind: crate::error::DescribeAccountAuditConfigurationErrorKind::ThrottlingException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::throttling_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_throttling_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DescribeAccountAuditConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::DescribeAccountAuditConfigurationError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the DescribeAccountAuditConfigurationError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
src/operation_deser.rs (line 10131)
10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133
pub fn parse_describe_account_audit_configuration_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DescribeAccountAuditConfigurationOutput,
crate::error::DescribeAccountAuditConfigurationError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::DescribeAccountAuditConfigurationError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::DescribeAccountAuditConfigurationError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InternalFailureException" => crate::error::DescribeAccountAuditConfigurationError {
meta: generic,
kind:
crate::error::DescribeAccountAuditConfigurationErrorKind::InternalFailureException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::internal_failure_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_failure_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DescribeAccountAuditConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::DescribeAccountAuditConfigurationError {
meta: generic,
kind: crate::error::DescribeAccountAuditConfigurationErrorKind::ThrottlingException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::throttling_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_throttling_exception_json_err(response.body().as_ref(), output).map_err(crate::error::DescribeAccountAuditConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::DescribeAccountAuditConfigurationError::generic(generic),
})
}
sourcepub fn meta(&self) -> &Error
pub fn meta(&self) -> &Error
Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
Returns the request ID if it’s available.
sourcepub fn is_internal_failure_exception(&self) -> bool
pub fn is_internal_failure_exception(&self) -> bool
Returns true
if the error kind is DescribeAccountAuditConfigurationErrorKind::InternalFailureException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is DescribeAccountAuditConfigurationErrorKind::ThrottlingException
.
Trait Implementations§
source§impl Error for DescribeAccountAuditConfigurationError
impl Error for DescribeAccountAuditConfigurationError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<DescribeAccountAuditConfigurationError> for Error
impl From<DescribeAccountAuditConfigurationError> for Error
source§fn from(err: DescribeAccountAuditConfigurationError) -> Self
fn from(err: DescribeAccountAuditConfigurationError) -> Self
Converts to this type from the input type.