#[non_exhaustive]pub struct UpdateIntegrationResponseError {
pub kind: UpdateIntegrationResponseErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateIntegrationResponse
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: UpdateIntegrationResponseErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateIntegrationResponseError
impl UpdateIntegrationResponseError
sourcepub fn new(kind: UpdateIntegrationResponseErrorKind, meta: Error) -> Self
pub fn new(kind: UpdateIntegrationResponseErrorKind, meta: Error) -> Self
Creates a new UpdateIntegrationResponseError
.
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 UpdateIntegrationResponseError::Unhandled
variant from any error type.
Examples found in repository?
13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069
pub fn parse_update_integration_response_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateIntegrationResponseOutput,
crate::error::UpdateIntegrationResponseError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateIntegrationResponseError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"BadRequestException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::BadRequestException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::bad_request_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_bad_request_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ConflictException" => {
crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::ConflictException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::conflict_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"LimitExceededException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::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::UpdateIntegrationResponseError::unhandled)?;
output = output.set_retry_after_seconds(
crate::http_serde::deser_header_update_integration_response_limit_exceeded_exception_retry_after_seconds(response.headers())
.map_err(|_|crate::error::UpdateIntegrationResponseError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After"))?
);
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotFoundException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::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::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"TooManyRequestsException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::TooManyRequestsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::too_many_requests_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output = output.set_retry_after_seconds(
crate::http_serde::deser_header_update_integration_response_too_many_requests_exception_retry_after_seconds(response.headers())
.map_err(|_|crate::error::UpdateIntegrationResponseError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After"))?
);
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"UnauthorizedException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::UnauthorizedException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::unauthorized_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unauthorized_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateIntegrationResponseError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateIntegrationResponseError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955 13956 13957 13958 13959 13960 13961 13962 13963 13964 13965 13966 13967 13968 13969 13970 13971 13972 13973 13974 13975 13976 13977 13978 13979 13980 13981 13982 13983 13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 13995 13996 13997 13998 13999 14000 14001 14002 14003 14004 14005 14006 14007 14008 14009 14010 14011 14012 14013 14014 14015 14016 14017 14018 14019 14020 14021 14022 14023 14024 14025 14026 14027 14028 14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 14055 14056 14057 14058 14059 14060 14061 14062 14063 14064 14065 14066 14067 14068 14069
pub fn parse_update_integration_response_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateIntegrationResponseOutput,
crate::error::UpdateIntegrationResponseError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateIntegrationResponseError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"BadRequestException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::BadRequestException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::bad_request_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_bad_request_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ConflictException" => {
crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::ConflictException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::conflict_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_conflict_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"LimitExceededException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::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::UpdateIntegrationResponseError::unhandled)?;
output = output.set_retry_after_seconds(
crate::http_serde::deser_header_update_integration_response_limit_exceeded_exception_retry_after_seconds(response.headers())
.map_err(|_|crate::error::UpdateIntegrationResponseError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After"))?
);
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"NotFoundException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::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::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"TooManyRequestsException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::TooManyRequestsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::too_many_requests_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_too_many_requests_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output = output.set_retry_after_seconds(
crate::http_serde::deser_header_update_integration_response_too_many_requests_exception_retry_after_seconds(response.headers())
.map_err(|_|crate::error::UpdateIntegrationResponseError::unhandled("Failed to parse retryAfterSeconds from header `Retry-After"))?
);
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"UnauthorizedException" => crate::error::UpdateIntegrationResponseError {
meta: generic,
kind: crate::error::UpdateIntegrationResponseErrorKind::UnauthorizedException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::unauthorized_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_unauthorized_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateIntegrationResponseError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateIntegrationResponseError::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_bad_request_exception(&self) -> bool
pub fn is_bad_request_exception(&self) -> bool
Returns true
if the error kind is UpdateIntegrationResponseErrorKind::BadRequestException
.
sourcepub fn is_conflict_exception(&self) -> bool
pub fn is_conflict_exception(&self) -> bool
Returns true
if the error kind is UpdateIntegrationResponseErrorKind::ConflictException
.
sourcepub fn is_limit_exceeded_exception(&self) -> bool
pub fn is_limit_exceeded_exception(&self) -> bool
Returns true
if the error kind is UpdateIntegrationResponseErrorKind::LimitExceededException
.
sourcepub fn is_not_found_exception(&self) -> bool
pub fn is_not_found_exception(&self) -> bool
Returns true
if the error kind is UpdateIntegrationResponseErrorKind::NotFoundException
.
sourcepub fn is_too_many_requests_exception(&self) -> bool
pub fn is_too_many_requests_exception(&self) -> bool
Returns true
if the error kind is UpdateIntegrationResponseErrorKind::TooManyRequestsException
.
Returns true
if the error kind is UpdateIntegrationResponseErrorKind::UnauthorizedException
.