#[non_exhaustive]pub struct UpdateRoutingProfileDefaultOutboundQueueError {
pub kind: UpdateRoutingProfileDefaultOutboundQueueErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateRoutingProfileDefaultOutboundQueue
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: UpdateRoutingProfileDefaultOutboundQueueErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateRoutingProfileDefaultOutboundQueueError
impl UpdateRoutingProfileDefaultOutboundQueueError
sourcepub fn new(
kind: UpdateRoutingProfileDefaultOutboundQueueErrorKind,
meta: Error
) -> Self
pub fn new(
kind: UpdateRoutingProfileDefaultOutboundQueueErrorKind,
meta: Error
) -> Self
Creates a new UpdateRoutingProfileDefaultOutboundQueueError
.
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 UpdateRoutingProfileDefaultOutboundQueueError::Unhandled
variant from any error type.
Examples found in repository?
18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374
pub fn parse_update_routing_profile_default_outbound_queue_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateRoutingProfileDefaultOutboundQueueOutput,
crate::error::UpdateRoutingProfileDefaultOutboundQueueError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(
crate::error::UpdateRoutingProfileDefaultOutboundQueueError::unhandled(generic),
)
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InternalServiceException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidRequestException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::UpdateRoutingProfileDefaultOutboundQueueError::generic(generic)
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateRoutingProfileDefaultOutboundQueueError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 18293 18294 18295 18296 18297 18298 18299 18300 18301 18302 18303 18304 18305 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 18321 18322 18323 18324 18325 18326 18327 18328 18329 18330 18331 18332 18333 18334 18335 18336 18337 18338 18339 18340 18341 18342 18343 18344 18345 18346 18347 18348 18349 18350 18351 18352 18353 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374
pub fn parse_update_routing_profile_default_outbound_queue_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateRoutingProfileDefaultOutboundQueueOutput,
crate::error::UpdateRoutingProfileDefaultOutboundQueueError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(
crate::error::UpdateRoutingProfileDefaultOutboundQueueError::unhandled(generic),
)
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InternalServiceException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidRequestException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::UpdateRoutingProfileDefaultOutboundQueueError { meta: generic, kind: crate::error::UpdateRoutingProfileDefaultOutboundQueueErrorKind::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::UpdateRoutingProfileDefaultOutboundQueueError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::UpdateRoutingProfileDefaultOutboundQueueError::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_service_exception(&self) -> bool
pub fn is_internal_service_exception(&self) -> bool
Returns true
if the error kind is UpdateRoutingProfileDefaultOutboundQueueErrorKind::InternalServiceException
.
sourcepub fn is_invalid_parameter_exception(&self) -> bool
pub fn is_invalid_parameter_exception(&self) -> bool
Returns true
if the error kind is UpdateRoutingProfileDefaultOutboundQueueErrorKind::InvalidParameterException
.
sourcepub fn is_invalid_request_exception(&self) -> bool
pub fn is_invalid_request_exception(&self) -> bool
Returns true
if the error kind is UpdateRoutingProfileDefaultOutboundQueueErrorKind::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 UpdateRoutingProfileDefaultOutboundQueueErrorKind::ResourceNotFoundException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is UpdateRoutingProfileDefaultOutboundQueueErrorKind::ThrottlingException
.