#[non_exhaustive]pub struct ListOfferingTransactionsError {
pub kind: ListOfferingTransactionsErrorKind,
/* private fields */
}Expand description
Error type for the ListOfferingTransactions 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: ListOfferingTransactionsErrorKindKind of error that occurred.
Implementations§
source§impl ListOfferingTransactionsError
impl ListOfferingTransactionsError
sourcepub fn new(kind: ListOfferingTransactionsErrorKind, meta: Error) -> Self
pub fn new(kind: ListOfferingTransactionsErrorKind, meta: Error) -> Self
Creates a new ListOfferingTransactionsError.
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 ListOfferingTransactionsError::Unhandled variant from any error type.
Examples found in repository?
4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993
pub fn parse_list_offering_transactions_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ListOfferingTransactionsOutput,
crate::error::ListOfferingTransactionsError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::ListOfferingTransactionsError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"ArgumentException" => {
crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::ArgumentException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::argument_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_argument_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"LimitExceededException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::LimitExceededException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::limit_exceeded_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_limit_exceeded_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotEligibleException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::NotEligibleException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::not_eligible_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_not_eligible_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotFoundException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::NotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ServiceAccountException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::ServiceAccountException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::service_account_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_account_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::ListOfferingTransactionsError::generic(generic),
})
}sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the ListOfferingTransactionsError::Unhandled variant from a aws_smithy_types::Error.
Examples found in repository?
4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993
pub fn parse_list_offering_transactions_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ListOfferingTransactionsOutput,
crate::error::ListOfferingTransactionsError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::ListOfferingTransactionsError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"ArgumentException" => {
crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::ArgumentException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::argument_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_argument_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"LimitExceededException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::LimitExceededException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::limit_exceeded_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_limit_exceeded_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotEligibleException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::NotEligibleException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::not_eligible_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_not_eligible_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotFoundException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::NotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ServiceAccountException" => crate::error::ListOfferingTransactionsError {
meta: generic,
kind: crate::error::ListOfferingTransactionsErrorKind::ServiceAccountException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::service_account_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_service_account_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ListOfferingTransactionsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::ListOfferingTransactionsError::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_argument_exception(&self) -> bool
pub fn is_argument_exception(&self) -> bool
Returns true if the error kind is ListOfferingTransactionsErrorKind::ArgumentException.
sourcepub fn is_limit_exceeded_exception(&self) -> bool
pub fn is_limit_exceeded_exception(&self) -> bool
Returns true if the error kind is ListOfferingTransactionsErrorKind::LimitExceededException.
sourcepub fn is_not_eligible_exception(&self) -> bool
pub fn is_not_eligible_exception(&self) -> bool
Returns true if the error kind is ListOfferingTransactionsErrorKind::NotEligibleException.
sourcepub fn is_not_found_exception(&self) -> bool
pub fn is_not_found_exception(&self) -> bool
Returns true if the error kind is ListOfferingTransactionsErrorKind::NotFoundException.
sourcepub fn is_service_account_exception(&self) -> bool
pub fn is_service_account_exception(&self) -> bool
Returns true if the error kind is ListOfferingTransactionsErrorKind::ServiceAccountException.