#[non_exhaustive]pub struct ImportDecoderManifestError {
pub kind: ImportDecoderManifestErrorKind,
/* private fields */
}
Expand description
Error type for the ImportDecoderManifest
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: ImportDecoderManifestErrorKind
Kind of error that occurred.
Implementations§
source§impl ImportDecoderManifestError
impl ImportDecoderManifestError
sourcepub fn new(kind: ImportDecoderManifestErrorKind, meta: Error) -> Self
pub fn new(kind: ImportDecoderManifestErrorKind, meta: Error) -> Self
Creates a new ImportDecoderManifestError
.
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 ImportDecoderManifestError::Unhandled
variant from any error type.
Examples found in repository?
3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388
pub fn parse_import_decoder_manifest_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ImportDecoderManifestOutput,
crate::error::ImportDecoderManifestError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::ImportDecoderManifestError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::ImportDecoderManifestError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ConflictException" => {
crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"DecoderManifestValidationException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::DecoderManifestValidationException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::decoder_manifest_validation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_decoder_manifest_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InvalidSignalsException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::InvalidSignalsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_signals_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_signals_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ThrottlingException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ValidationException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::ValidationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::validation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InternalServerException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::InternalServerException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_server_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::ImportDecoderManifestError::generic(generic),
})
}
sourcepub fn generic(err: Error) -> Self
pub fn generic(err: Error) -> Self
Creates the ImportDecoderManifestError::Unhandled
variant from a aws_smithy_types::Error
.
Examples found in repository?
3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388
pub fn parse_import_decoder_manifest_error(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ImportDecoderManifestOutput,
crate::error::ImportDecoderManifestError,
> {
let generic = crate::json_deser::parse_http_generic_error(response)
.map_err(crate::error::ImportDecoderManifestError::unhandled)?;
let error_code = match generic.code() {
Some(code) => code,
None => return Err(crate::error::ImportDecoderManifestError::unhandled(generic)),
};
let _error_message = generic.message().map(|msg| msg.to_owned());
Err(match error_code {
"AccessDeniedException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ConflictException" => {
crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
}
}
"DecoderManifestValidationException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::DecoderManifestValidationException(
{
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output =
crate::error::decoder_manifest_validation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_decoder_manifest_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
},
),
},
"InvalidSignalsException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::InvalidSignalsException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::invalid_signals_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_invalid_signals_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ResourceNotFoundException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ThrottlingException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::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::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"ValidationException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::ValidationException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::validation_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_validation_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
"InternalServerException" => crate::error::ImportDecoderManifestError {
meta: generic,
kind: crate::error::ImportDecoderManifestErrorKind::InternalServerException({
#[allow(unused_mut)]
let mut tmp = {
#[allow(unused_mut)]
let mut output = crate::error::internal_server_exception::Builder::default();
let _ = response;
output = crate::json_deser::deser_structure_crate_error_internal_server_exception_json_err(response.body().as_ref(), output).map_err(crate::error::ImportDecoderManifestError::unhandled)?;
output.build()
};
if tmp.message.is_none() {
tmp.message = _error_message;
}
tmp
}),
},
_ => crate::error::ImportDecoderManifestError::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 ImportDecoderManifestErrorKind::AccessDeniedException
.
sourcepub fn is_conflict_exception(&self) -> bool
pub fn is_conflict_exception(&self) -> bool
Returns true
if the error kind is ImportDecoderManifestErrorKind::ConflictException
.
sourcepub fn is_decoder_manifest_validation_exception(&self) -> bool
pub fn is_decoder_manifest_validation_exception(&self) -> bool
Returns true
if the error kind is ImportDecoderManifestErrorKind::DecoderManifestValidationException
.
sourcepub fn is_invalid_signals_exception(&self) -> bool
pub fn is_invalid_signals_exception(&self) -> bool
Returns true
if the error kind is ImportDecoderManifestErrorKind::InvalidSignalsException
.
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 ImportDecoderManifestErrorKind::ResourceNotFoundException
.
sourcepub fn is_throttling_exception(&self) -> bool
pub fn is_throttling_exception(&self) -> bool
Returns true
if the error kind is ImportDecoderManifestErrorKind::ThrottlingException
.
sourcepub fn is_validation_exception(&self) -> bool
pub fn is_validation_exception(&self) -> bool
Returns true
if the error kind is ImportDecoderManifestErrorKind::ValidationException
.
sourcepub fn is_internal_server_exception(&self) -> bool
pub fn is_internal_server_exception(&self) -> bool
Returns true
if the error kind is ImportDecoderManifestErrorKind::InternalServerException
.