#[non_exhaustive]pub struct UpdateOrganizationConfigurationError {
pub kind: UpdateOrganizationConfigurationErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateOrganizationConfiguration
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: UpdateOrganizationConfigurationErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateOrganizationConfigurationError
impl UpdateOrganizationConfigurationError
sourcepub fn new(kind: UpdateOrganizationConfigurationErrorKind, meta: Error) -> Self
pub fn new(kind: UpdateOrganizationConfigurationErrorKind, meta: Error) -> Self
Creates a new UpdateOrganizationConfigurationError
.
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 UpdateOrganizationConfigurationError::Unhandled
variant from any error type.
Examples found in repository?
6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221
pub fn parse_update_organization_configuration_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateOrganizationConfigurationOutput,
crate::error::UpdateOrganizationConfigurationError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::UpdateOrganizationConfigurationError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InternalException" => {
crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::InternalException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"InvalidAccessException" => crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::InvalidAccessException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_access_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_access_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidInputException" => crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::InvalidInputException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_input_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_input_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"LimitExceededException" => crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::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::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateOrganizationConfigurationError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateOrganizationConfigurationError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221
pub fn parse_update_organization_configuration_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateOrganizationConfigurationOutput,
crate::error::UpdateOrganizationConfigurationError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::UpdateOrganizationConfigurationError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"InternalException" => {
crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::InternalException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"InvalidAccessException" => crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::InvalidAccessException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_access_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_access_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidInputException" => crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::InvalidInputException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_input_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_input_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"LimitExceededException" => crate::error::UpdateOrganizationConfigurationError {
meta: generic,
kind: crate::error::UpdateOrganizationConfigurationErrorKind::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::UpdateOrganizationConfigurationError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateOrganizationConfigurationError::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_exception(&self) -> bool
pub fn is_internal_exception(&self) -> bool
Returns true
if the error kind is UpdateOrganizationConfigurationErrorKind::InternalException
.
sourcepub fn is_invalid_access_exception(&self) -> bool
pub fn is_invalid_access_exception(&self) -> bool
Returns true
if the error kind is UpdateOrganizationConfigurationErrorKind::InvalidAccessException
.
sourcepub fn is_invalid_input_exception(&self) -> bool
pub fn is_invalid_input_exception(&self) -> bool
Returns true
if the error kind is UpdateOrganizationConfigurationErrorKind::InvalidInputException
.
sourcepub fn is_limit_exceeded_exception(&self) -> bool
pub fn is_limit_exceeded_exception(&self) -> bool
Returns true
if the error kind is UpdateOrganizationConfigurationErrorKind::LimitExceededException
.