#[non_exhaustive]pub struct UpdateContactFlowModuleMetadataError {
pub kind: UpdateContactFlowModuleMetadataErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateContactFlowModuleMetadata
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: UpdateContactFlowModuleMetadataErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateContactFlowModuleMetadataError
impl UpdateContactFlowModuleMetadataError
sourcepub fn new(kind: UpdateContactFlowModuleMetadataErrorKind, meta: Error) -> Self
pub fn new(kind: UpdateContactFlowModuleMetadataErrorKind, meta: Error) -> Self
Creates a new UpdateContactFlowModuleMetadataError
.
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 UpdateContactFlowModuleMetadataError::Unhandled
variant from any error type.
Examples found in repository?
16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437
pub fn parse_update_contact_flow_module_metadata_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateContactFlowModuleMetadataOutput,
crate::error::UpdateContactFlowModuleMetadataError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::UpdateContactFlowModuleMetadataError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::AccessDeniedException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::access_denied_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"DuplicateResourceException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind:
crate::error::UpdateContactFlowModuleMetadataErrorKind::DuplicateResourceException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::duplicate_resource_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_duplicate_resource_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InternalServiceException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::InternalServiceException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::internal_service_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_service_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InvalidParameterException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::InvalidParameterException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::invalid_parameter_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_parameter_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InvalidRequestException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::InvalidRequestException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::invalid_request_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_request_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ResourceNotFoundException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::ResourceNotFoundException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::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::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateContactFlowModuleMetadataError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateContactFlowModuleMetadataError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
16285 16286 16287 16288 16289 16290 16291 16292 16293 16294 16295 16296 16297 16298 16299 16300 16301 16302 16303 16304 16305 16306 16307 16308 16309 16310 16311 16312 16313 16314 16315 16316 16317 16318 16319 16320 16321 16322 16323 16324 16325 16326 16327 16328 16329 16330 16331 16332 16333 16334 16335 16336 16337 16338 16339 16340 16341 16342 16343 16344 16345 16346 16347 16348 16349 16350 16351 16352 16353 16354 16355 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 16368 16369 16370 16371 16372 16373 16374 16375 16376 16377 16378 16379 16380 16381 16382 16383 16384 16385 16386 16387 16388 16389 16390 16391 16392 16393 16394 16395 16396 16397 16398 16399 16400 16401 16402 16403 16404 16405 16406 16407 16408 16409 16410 16411 16412 16413 16414 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 16431 16432 16433 16434 16435 16436 16437
pub fn parse_update_contact_flow_module_metadata_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateContactFlowModuleMetadataOutput,
crate::error::UpdateContactFlowModuleMetadataError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::UpdateContactFlowModuleMetadataError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::AccessDeniedException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::access_denied_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_access_denied_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"DuplicateResourceException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind:
crate::error::UpdateContactFlowModuleMetadataErrorKind::DuplicateResourceException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::duplicate_resource_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_duplicate_resource_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InternalServiceException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::InternalServiceException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::internal_service_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_service_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InvalidParameterException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::InvalidParameterException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::invalid_parameter_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_parameter_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InvalidRequestException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::InvalidRequestException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::invalid_request_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_request_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ResourceNotFoundException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::ResourceNotFoundException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::resource_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"ThrottlingException" => crate::error::UpdateContactFlowModuleMetadataError {
meta: generic,
kind: crate::error::UpdateContactFlowModuleMetadataErrorKind::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::UpdateContactFlowModuleMetadataError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateContactFlowModuleMetadataError::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_access_denied_exception(&self) -> bool
pub fn is_access_denied_exception(&self) -> bool
Returns true
if the error kind is UpdateContactFlowModuleMetadataErrorKind::AccessDeniedException
.
sourcepub fn is_duplicate_resource_exception(&self) -> bool
pub fn is_duplicate_resource_exception(&self) -> bool
Returns true
if the error kind is UpdateContactFlowModuleMetadataErrorKind::DuplicateResourceException
.
sourcepub fn is_internal_service_exception(&self) -> bool
pub fn is_internal_service_exception(&self) -> bool
Returns true
if the error kind is UpdateContactFlowModuleMetadataErrorKind::InternalServiceException
.
sourcepub fn is_invalid_parameter_exception(&self) -> bool
pub fn is_invalid_parameter_exception(&self) -> bool
Returns true
if the error kind is UpdateContactFlowModuleMetadataErrorKind::InvalidParameterException
.
sourcepub fn is_invalid_request_exception(&self) -> bool
pub fn is_invalid_request_exception(&self) -> bool
Returns true
if the error kind is UpdateContactFlowModuleMetadataErrorKind::InvalidRequestException
.
sourcepub fn is_resource_not_found_exception(&self) -> bool
pub fn is_resource_not_found_exception(&self) -> bool
Returns true
if the error kind is UpdateContactFlowModuleMetadataErrorKind::ResourceNotFoundException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is UpdateContactFlowModuleMetadataErrorKind::ThrottlingException
.