#[non_exhaustive]pub struct GenerateEmbedUrlForAnonymousUserError {
pub kind: GenerateEmbedUrlForAnonymousUserErrorKind,
/* private fields */
}Expand description
Error type for the GenerateEmbedUrlForAnonymousUser 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: GenerateEmbedUrlForAnonymousUserErrorKindKind of error that occurred.
Implementations§
source§impl GenerateEmbedUrlForAnonymousUserError
impl GenerateEmbedUrlForAnonymousUserError
sourcepub fn new(kind: GenerateEmbedUrlForAnonymousUserErrorKind, meta: Error) -> Self
pub fn new(kind: GenerateEmbedUrlForAnonymousUserErrorKind, meta: Error) -> Self
Creates a new GenerateEmbedUrlForAnonymousUserError.
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 GenerateEmbedUrlForAnonymousUserError::Unhandled variant from any error type.
Examples found in repository?
9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788
pub fn parse_generate_embed_url_for_anonymous_user_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GenerateEmbedUrlForAnonymousUserOutput,
crate::error::GenerateEmbedUrlForAnonymousUserError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InternalFailureException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValueException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::json_deser::deser_structure_crate_error_invalid_parameter_value_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"SessionLifetimeInMinutesInvalidException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::SessionLifetimeInMinutesInvalidException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::session_lifetime_in_minutes_invalid_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_session_lifetime_in_minutes_invalid_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedPricingPlanException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::UnsupportedPricingPlanException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_pricing_plan_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_pricing_plan_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedUserEditionException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::UnsupportedUserEditionException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_user_edition_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_user_edition_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::GenerateEmbedUrlForAnonymousUserError::generic(generic)
})
}sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the GenerateEmbedUrlForAnonymousUserError::Unhandled variant from a aws_smithy_types::Error.
Examples found in repository?
9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788
pub fn parse_generate_embed_url_for_anonymous_user_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::GenerateEmbedUrlForAnonymousUserOutput,
crate::error::GenerateEmbedUrlForAnonymousUserError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled(generic))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InternalFailureException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"InvalidParameterValueException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::json_deser::deser_structure_crate_error_invalid_parameter_value_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ResourceNotFoundException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"SessionLifetimeInMinutesInvalidException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::SessionLifetimeInMinutesInvalidException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::session_lifetime_in_minutes_invalid_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_session_lifetime_in_minutes_invalid_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"ThrottlingException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::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::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedPricingPlanException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::UnsupportedPricingPlanException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_pricing_plan_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_pricing_plan_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
"UnsupportedUserEditionException" => crate::error::GenerateEmbedUrlForAnonymousUserError { meta: generic, kind: crate::error::GenerateEmbedUrlForAnonymousUserErrorKind::UnsupportedUserEditionException({
#[allow(unused_mut)]let mut tmp =
{
#[allow(unused_mut)]let mut output = crate::error::unsupported_user_edition_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unsupported_user_edition_exception_json_err(response.body().as_ref(), output).map_err(crate::error::GenerateEmbedUrlForAnonymousUserError::unhandled)?;
output.build()
}
;
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
})},
_ => crate::error::GenerateEmbedUrlForAnonymousUserError::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 GenerateEmbedUrlForAnonymousUserErrorKind::AccessDeniedException.
sourcepub fn is_internal_failure_exception(&self) -> bool
pub fn is_internal_failure_exception(&self) -> bool
Returns true if the error kind is GenerateEmbedUrlForAnonymousUserErrorKind::InternalFailureException.
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 GenerateEmbedUrlForAnonymousUserErrorKind::InvalidParameterValueException.
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 GenerateEmbedUrlForAnonymousUserErrorKind::ResourceNotFoundException.
sourcepub fn is_session_lifetime_in_minutes_invalid_exception(&self) -> bool
pub fn is_session_lifetime_in_minutes_invalid_exception(&self) -> bool
Returns true if the error kind is GenerateEmbedUrlForAnonymousUserErrorKind::SessionLifetimeInMinutesInvalidException.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true if the error kind is GenerateEmbedUrlForAnonymousUserErrorKind::ThrottlingException.
sourcepub fn is_unsupported_pricing_plan_exception(&self) -> bool
pub fn is_unsupported_pricing_plan_exception(&self) -> bool
Returns true if the error kind is GenerateEmbedUrlForAnonymousUserErrorKind::UnsupportedPricingPlanException.
sourcepub fn is_unsupported_user_edition_exception(&self) -> bool
pub fn is_unsupported_user_edition_exception(&self) -> bool
Returns true if the error kind is GenerateEmbedUrlForAnonymousUserErrorKind::UnsupportedUserEditionException.