#[non_exhaustive]pub struct DescribeGlobalReplicationGroupsError {
pub kind: DescribeGlobalReplicationGroupsErrorKind,
/* private fields */
}
Expand description
Error type for the DescribeGlobalReplicationGroups
operation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: DescribeGlobalReplicationGroupsErrorKind
Kind of error that occurred.
Implementations§
source§impl DescribeGlobalReplicationGroupsError
impl DescribeGlobalReplicationGroupsError
sourcepub fn new(kind: DescribeGlobalReplicationGroupsErrorKind, meta: Error) -> Self
pub fn new(kind: DescribeGlobalReplicationGroupsErrorKind, meta: Error) -> Self
Creates a new DescribeGlobalReplicationGroupsError
.
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 DescribeGlobalReplicationGroupsError::Unhandled
variant from any error type.
Examples found in repository?
4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432
pub fn parse_describe_global_replication_groups_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DescribeGlobalReplicationGroupsOutput,
crate::error::DescribeGlobalReplicationGroupsError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::DescribeGlobalReplicationGroupsError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"GlobalReplicationGroupNotFoundFault" => crate::error::DescribeGlobalReplicationGroupsError { meta: generic, kind: crate::error::DescribeGlobalReplicationGroupsErrorKind::GlobalReplicationGroupNotFoundFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::global_replication_group_not_found_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_global_replication_group_not_found_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::DescribeGlobalReplicationGroupsError { meta: generic, kind: crate::error::DescribeGlobalReplicationGroupsErrorKind::InvalidParameterCombinationException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_combination_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_combination_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::DescribeGlobalReplicationGroupsError { meta: generic, kind: crate::error::DescribeGlobalReplicationGroupsErrorKind::InvalidParameterValueException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_value_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_value_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::DescribeGlobalReplicationGroupsError::generic(generic)
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the DescribeGlobalReplicationGroupsError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432
pub fn parse_describe_global_replication_groups_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::DescribeGlobalReplicationGroupsOutput,
crate::error::DescribeGlobalReplicationGroupsError,
> {
let generic = crate::xml_deser::parse_http_generic_error(response)
.map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::DescribeGlobalReplicationGroupsError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"GlobalReplicationGroupNotFoundFault" => crate::error::DescribeGlobalReplicationGroupsError { meta: generic, kind: crate::error::DescribeGlobalReplicationGroupsErrorKind::GlobalReplicationGroupNotFoundFault({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::global_replication_group_not_found_fault::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_global_replication_group_not_found_fault_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterCombination" => crate::error::DescribeGlobalReplicationGroupsError { meta: generic, kind: crate::error::DescribeGlobalReplicationGroupsErrorKind::InvalidParameterCombinationException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_combination_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_combination_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValue" => crate::error::DescribeGlobalReplicationGroupsError { meta: generic, kind: crate::error::DescribeGlobalReplicationGroupsErrorKind::InvalidParameterValueException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::invalid_parameter_value_exception::Builder::default();
let _ = response;
output = crate::xml_deser::deser_structure_crate_error_invalid_parameter_value_exception_xml_err(response.body().as_ref(), output).map_err(crate::error::DescribeGlobalReplicationGroupsError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::DescribeGlobalReplicationGroupsError::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_global_replication_group_not_found_fault(&self) -> bool
pub fn is_global_replication_group_not_found_fault(&self) -> bool
Returns true
if the error kind is DescribeGlobalReplicationGroupsErrorKind::GlobalReplicationGroupNotFoundFault
.
sourcepub fn is_invalid_parameter_combination_exception(&self) -> bool
pub fn is_invalid_parameter_combination_exception(&self) -> bool
Returns true
if the error kind is DescribeGlobalReplicationGroupsErrorKind::InvalidParameterCombinationException
.
sourcepub fn is_invalid_parameter_value_exception(&self) -> bool
pub fn is_invalid_parameter_value_exception(&self) -> bool
Returns true
if the error kind is DescribeGlobalReplicationGroupsErrorKind::InvalidParameterValueException
.