#[non_exhaustive]pub struct UpdateGlobalTableSettingsError {
pub kind: UpdateGlobalTableSettingsErrorKind,
/* private fields */
}
Expand description
Error type for the UpdateGlobalTableSettings
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: UpdateGlobalTableSettingsErrorKind
Kind of error that occurred.
Implementations§
source§impl UpdateGlobalTableSettingsError
impl UpdateGlobalTableSettingsError
sourcepub fn new(kind: UpdateGlobalTableSettingsErrorKind, meta: Error) -> Self
pub fn new(kind: UpdateGlobalTableSettingsErrorKind, meta: Error) -> Self
Creates a new UpdateGlobalTableSettingsError
.
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 UpdateGlobalTableSettingsError::Unhandled
variant from any error type.
Examples found in repository?
5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324
pub fn parse_update_global_table_settings_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateGlobalTableSettingsOutput,
crate::error::UpdateGlobalTableSettingsError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateGlobalTableSettingsError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"GlobalTableNotFoundException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::GlobalTableNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::global_table_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_global_table_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"IndexNotFoundException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::IndexNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::index_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_index_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InternalServerError" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::InternalServerError({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_server_error::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_server_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidEndpointException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::InvalidEndpointException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_endpoint_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_endpoint_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"LimitExceededException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::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::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ReplicaNotFoundException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::ReplicaNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::replica_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_replica_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceInUseException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::ResourceInUseException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_in_use_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_in_use_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateGlobalTableSettingsError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the UpdateGlobalTableSettingsError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324
pub fn parse_update_global_table_settings_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::UpdateGlobalTableSettingsOutput,
crate::error::UpdateGlobalTableSettingsError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => {
return Err(crate::error::UpdateGlobalTableSettingsError::unhandled(
generic,
))
}
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"GlobalTableNotFoundException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::GlobalTableNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::global_table_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_global_table_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"IndexNotFoundException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::IndexNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::index_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_index_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InternalServerError" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::InternalServerError({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_server_error::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_server_error_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InvalidEndpointException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::InvalidEndpointException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_endpoint_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_endpoint_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"LimitExceededException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::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::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ReplicaNotFoundException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::ReplicaNotFoundException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::replica_not_found_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_replica_not_found_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceInUseException" => crate::error::UpdateGlobalTableSettingsError {
meta: generic,
kind: crate::error::UpdateGlobalTableSettingsErrorKind::ResourceInUseException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::resource_in_use_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_resource_in_use_exception_json_err(response.body().as_ref(), output).map_err(crate::error::UpdateGlobalTableSettingsError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::UpdateGlobalTableSettingsError::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_global_table_not_found_exception(&self) -> bool
pub fn is_global_table_not_found_exception(&self) -> bool
Returns true
if the error kind is UpdateGlobalTableSettingsErrorKind::GlobalTableNotFoundException
.
sourcepub fn is_index_not_found_exception(&self) -> bool
pub fn is_index_not_found_exception(&self) -> bool
Returns true
if the error kind is UpdateGlobalTableSettingsErrorKind::IndexNotFoundException
.
sourcepub fn is_internal_server_error(&self) -> bool
pub fn is_internal_server_error(&self) -> bool
Returns true
if the error kind is UpdateGlobalTableSettingsErrorKind::InternalServerError
.
sourcepub fn is_invalid_endpoint_exception(&self) -> bool
pub fn is_invalid_endpoint_exception(&self) -> bool
Returns true
if the error kind is UpdateGlobalTableSettingsErrorKind::InvalidEndpointException
.
sourcepub fn is_limit_exceeded_exception(&self) -> bool
pub fn is_limit_exceeded_exception(&self) -> bool
Returns true
if the error kind is UpdateGlobalTableSettingsErrorKind::LimitExceededException
.
sourcepub fn is_replica_not_found_exception(&self) -> bool
pub fn is_replica_not_found_exception(&self) -> bool
Returns true
if the error kind is UpdateGlobalTableSettingsErrorKind::ReplicaNotFoundException
.
sourcepub fn is_resource_in_use_exception(&self) -> bool
pub fn is_resource_in_use_exception(&self) -> bool
Returns true
if the error kind is UpdateGlobalTableSettingsErrorKind::ResourceInUseException
.