1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 ConflictException(crate::types::error::ConflictException),
8 InternalServerException(crate::types::error::InternalServerException),
10 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
12 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
14 ValidationException(crate::types::error::ValidationException),
16 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
18 variable wildcard pattern and check `.code()`:
19 \
20 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
21 \
22 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
23 Unhandled(crate::error::sealed_unhandled::Unhandled),
24}
25impl ::std::fmt::Display for Error {
26 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
27 match self {
28 Error::ConflictException(inner) => inner.fmt(f),
29 Error::InternalServerException(inner) => inner.fmt(f),
30 Error::ResourceNotFoundException(inner) => inner.fmt(f),
31 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
32 Error::ValidationException(inner) => inner.fmt(f),
33 Error::Unhandled(_) => {
34 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
35 write!(f, "unhandled error ({code})")
36 } else {
37 f.write_str("unhandled error")
38 }
39 }
40 }
41 }
42}
43impl From<::aws_smithy_types::error::operation::BuildError> for Error {
44 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
45 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
46 source: value.into(),
47 meta: ::std::default::Default::default(),
48 })
49 }
50}
51impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
52 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
53 match self {
54 Self::ConflictException(inner) => inner.meta(),
55 Self::InternalServerException(inner) => inner.meta(),
56 Self::ResourceNotFoundException(inner) => inner.meta(),
57 Self::ServiceQuotaExceededException(inner) => inner.meta(),
58 Self::ValidationException(inner) => inner.meta(),
59 Self::Unhandled(inner) => &inner.meta,
60 }
61 }
62}
63impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job_run::CancelJobRunError, R>> for Error
64where
65 R: Send + Sync + std::fmt::Debug + 'static,
66{
67 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job_run::CancelJobRunError, R>) -> Self {
68 match err {
69 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
70 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
71 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
72 source: err.into(),
73 }),
74 }
75 }
76}
77impl From<crate::operation::cancel_job_run::CancelJobRunError> for Error {
78 fn from(err: crate::operation::cancel_job_run::CancelJobRunError) -> Self {
79 match err {
80 crate::operation::cancel_job_run::CancelJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
81 crate::operation::cancel_job_run::CancelJobRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
82 crate::operation::cancel_job_run::CancelJobRunError::ValidationException(inner) => Error::ValidationException(inner),
83 crate::operation::cancel_job_run::CancelJobRunError::Unhandled(inner) => Error::Unhandled(inner),
84 }
85 }
86}
87impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_application::CreateApplicationError, R>> for Error
88where
89 R: Send + Sync + std::fmt::Debug + 'static,
90{
91 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_application::CreateApplicationError, R>) -> Self {
92 match err {
93 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
94 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
95 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
96 source: err.into(),
97 }),
98 }
99 }
100}
101impl From<crate::operation::create_application::CreateApplicationError> for Error {
102 fn from(err: crate::operation::create_application::CreateApplicationError) -> Self {
103 match err {
104 crate::operation::create_application::CreateApplicationError::ConflictException(inner) => Error::ConflictException(inner),
105 crate::operation::create_application::CreateApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
106 crate::operation::create_application::CreateApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
107 crate::operation::create_application::CreateApplicationError::ValidationException(inner) => Error::ValidationException(inner),
108 crate::operation::create_application::CreateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
109 }
110 }
111}
112impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_application::DeleteApplicationError, R>> for Error
113where
114 R: Send + Sync + std::fmt::Debug + 'static,
115{
116 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_application::DeleteApplicationError, R>) -> Self {
117 match err {
118 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
119 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
120 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
121 source: err.into(),
122 }),
123 }
124 }
125}
126impl From<crate::operation::delete_application::DeleteApplicationError> for Error {
127 fn from(err: crate::operation::delete_application::DeleteApplicationError) -> Self {
128 match err {
129 crate::operation::delete_application::DeleteApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
130 crate::operation::delete_application::DeleteApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
131 crate::operation::delete_application::DeleteApplicationError::ValidationException(inner) => Error::ValidationException(inner),
132 crate::operation::delete_application::DeleteApplicationError::Unhandled(inner) => Error::Unhandled(inner),
133 }
134 }
135}
136impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>> for Error
137where
138 R: Send + Sync + std::fmt::Debug + 'static,
139{
140 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>) -> Self {
141 match err {
142 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
143 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
144 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
145 source: err.into(),
146 }),
147 }
148 }
149}
150impl From<crate::operation::get_application::GetApplicationError> for Error {
151 fn from(err: crate::operation::get_application::GetApplicationError) -> Self {
152 match err {
153 crate::operation::get_application::GetApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
154 crate::operation::get_application::GetApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
155 crate::operation::get_application::GetApplicationError::ValidationException(inner) => Error::ValidationException(inner),
156 crate::operation::get_application::GetApplicationError::Unhandled(inner) => Error::Unhandled(inner),
157 }
158 }
159}
160impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError, R>> for Error
161where
162 R: Send + Sync + std::fmt::Debug + 'static,
163{
164 fn from(
165 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError, R>,
166 ) -> Self {
167 match err {
168 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
169 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
170 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
171 source: err.into(),
172 }),
173 }
174 }
175}
176impl From<crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError> for Error {
177 fn from(err: crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError) -> Self {
178 match err {
179 crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError::InternalServerException(inner) => {
180 Error::InternalServerException(inner)
181 }
182 crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError::ResourceNotFoundException(inner) => {
183 Error::ResourceNotFoundException(inner)
184 }
185 crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError::ValidationException(inner) => Error::ValidationException(inner),
186 crate::operation::get_dashboard_for_job_run::GetDashboardForJobRunError::Unhandled(inner) => Error::Unhandled(inner),
187 }
188 }
189}
190impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_run::GetJobRunError, R>> for Error
191where
192 R: Send + Sync + std::fmt::Debug + 'static,
193{
194 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_run::GetJobRunError, R>) -> Self {
195 match err {
196 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
197 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
198 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
199 source: err.into(),
200 }),
201 }
202 }
203}
204impl From<crate::operation::get_job_run::GetJobRunError> for Error {
205 fn from(err: crate::operation::get_job_run::GetJobRunError) -> Self {
206 match err {
207 crate::operation::get_job_run::GetJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
208 crate::operation::get_job_run::GetJobRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
209 crate::operation::get_job_run::GetJobRunError::ValidationException(inner) => Error::ValidationException(inner),
210 crate::operation::get_job_run::GetJobRunError::Unhandled(inner) => Error::Unhandled(inner),
211 }
212 }
213}
214impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_applications::ListApplicationsError, R>> for Error
215where
216 R: Send + Sync + std::fmt::Debug + 'static,
217{
218 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_applications::ListApplicationsError, R>) -> Self {
219 match err {
220 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
221 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
222 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
223 source: err.into(),
224 }),
225 }
226 }
227}
228impl From<crate::operation::list_applications::ListApplicationsError> for Error {
229 fn from(err: crate::operation::list_applications::ListApplicationsError) -> Self {
230 match err {
231 crate::operation::list_applications::ListApplicationsError::InternalServerException(inner) => Error::InternalServerException(inner),
232 crate::operation::list_applications::ListApplicationsError::ValidationException(inner) => Error::ValidationException(inner),
233 crate::operation::list_applications::ListApplicationsError::Unhandled(inner) => Error::Unhandled(inner),
234 }
235 }
236}
237impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_run_attempts::ListJobRunAttemptsError, R>> for Error
238where
239 R: Send + Sync + std::fmt::Debug + 'static,
240{
241 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_run_attempts::ListJobRunAttemptsError, R>) -> Self {
242 match err {
243 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
244 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
245 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
246 source: err.into(),
247 }),
248 }
249 }
250}
251impl From<crate::operation::list_job_run_attempts::ListJobRunAttemptsError> for Error {
252 fn from(err: crate::operation::list_job_run_attempts::ListJobRunAttemptsError) -> Self {
253 match err {
254 crate::operation::list_job_run_attempts::ListJobRunAttemptsError::InternalServerException(inner) => Error::InternalServerException(inner),
255 crate::operation::list_job_run_attempts::ListJobRunAttemptsError::ResourceNotFoundException(inner) => {
256 Error::ResourceNotFoundException(inner)
257 }
258 crate::operation::list_job_run_attempts::ListJobRunAttemptsError::ValidationException(inner) => Error::ValidationException(inner),
259 crate::operation::list_job_run_attempts::ListJobRunAttemptsError::Unhandled(inner) => Error::Unhandled(inner),
260 }
261 }
262}
263impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_runs::ListJobRunsError, R>> for Error
264where
265 R: Send + Sync + std::fmt::Debug + 'static,
266{
267 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_job_runs::ListJobRunsError, R>) -> Self {
268 match err {
269 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
270 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
271 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
272 source: err.into(),
273 }),
274 }
275 }
276}
277impl From<crate::operation::list_job_runs::ListJobRunsError> for Error {
278 fn from(err: crate::operation::list_job_runs::ListJobRunsError) -> Self {
279 match err {
280 crate::operation::list_job_runs::ListJobRunsError::InternalServerException(inner) => Error::InternalServerException(inner),
281 crate::operation::list_job_runs::ListJobRunsError::ValidationException(inner) => Error::ValidationException(inner),
282 crate::operation::list_job_runs::ListJobRunsError::Unhandled(inner) => Error::Unhandled(inner),
283 }
284 }
285}
286impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
287where
288 R: Send + Sync + std::fmt::Debug + 'static,
289{
290 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
291 match err {
292 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
293 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
294 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
295 source: err.into(),
296 }),
297 }
298 }
299}
300impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
301 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
302 match err {
303 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
304 Error::InternalServerException(inner)
305 }
306 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
307 Error::ResourceNotFoundException(inner)
308 }
309 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
310 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
311 }
312 }
313}
314impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_application::StartApplicationError, R>> for Error
315where
316 R: Send + Sync + std::fmt::Debug + 'static,
317{
318 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_application::StartApplicationError, R>) -> Self {
319 match err {
320 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
321 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
322 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
323 source: err.into(),
324 }),
325 }
326 }
327}
328impl From<crate::operation::start_application::StartApplicationError> for Error {
329 fn from(err: crate::operation::start_application::StartApplicationError) -> Self {
330 match err {
331 crate::operation::start_application::StartApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
332 crate::operation::start_application::StartApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
333 crate::operation::start_application::StartApplicationError::ServiceQuotaExceededException(inner) => {
334 Error::ServiceQuotaExceededException(inner)
335 }
336 crate::operation::start_application::StartApplicationError::ValidationException(inner) => Error::ValidationException(inner),
337 crate::operation::start_application::StartApplicationError::Unhandled(inner) => Error::Unhandled(inner),
338 }
339 }
340}
341impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_job_run::StartJobRunError, R>> for Error
342where
343 R: Send + Sync + std::fmt::Debug + 'static,
344{
345 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_job_run::StartJobRunError, R>) -> Self {
346 match err {
347 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
348 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
349 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
350 source: err.into(),
351 }),
352 }
353 }
354}
355impl From<crate::operation::start_job_run::StartJobRunError> for Error {
356 fn from(err: crate::operation::start_job_run::StartJobRunError) -> Self {
357 match err {
358 crate::operation::start_job_run::StartJobRunError::ConflictException(inner) => Error::ConflictException(inner),
359 crate::operation::start_job_run::StartJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
360 crate::operation::start_job_run::StartJobRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
361 crate::operation::start_job_run::StartJobRunError::ValidationException(inner) => Error::ValidationException(inner),
362 crate::operation::start_job_run::StartJobRunError::Unhandled(inner) => Error::Unhandled(inner),
363 }
364 }
365}
366impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_application::StopApplicationError, R>> for Error
367where
368 R: Send + Sync + std::fmt::Debug + 'static,
369{
370 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_application::StopApplicationError, R>) -> Self {
371 match err {
372 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
373 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
374 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
375 source: err.into(),
376 }),
377 }
378 }
379}
380impl From<crate::operation::stop_application::StopApplicationError> for Error {
381 fn from(err: crate::operation::stop_application::StopApplicationError) -> Self {
382 match err {
383 crate::operation::stop_application::StopApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
384 crate::operation::stop_application::StopApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
385 crate::operation::stop_application::StopApplicationError::ValidationException(inner) => Error::ValidationException(inner),
386 crate::operation::stop_application::StopApplicationError::Unhandled(inner) => Error::Unhandled(inner),
387 }
388 }
389}
390impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
391where
392 R: Send + Sync + std::fmt::Debug + 'static,
393{
394 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
395 match err {
396 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
397 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
398 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
399 source: err.into(),
400 }),
401 }
402 }
403}
404impl From<crate::operation::tag_resource::TagResourceError> for Error {
405 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
406 match err {
407 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
408 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
409 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
410 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
411 }
412 }
413}
414impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
415where
416 R: Send + Sync + std::fmt::Debug + 'static,
417{
418 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
419 match err {
420 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
421 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
422 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
423 source: err.into(),
424 }),
425 }
426 }
427}
428impl From<crate::operation::untag_resource::UntagResourceError> for Error {
429 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
430 match err {
431 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
432 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
433 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
434 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
435 }
436 }
437}
438impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application::UpdateApplicationError, R>> for Error
439where
440 R: Send + Sync + std::fmt::Debug + 'static,
441{
442 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application::UpdateApplicationError, R>) -> Self {
443 match err {
444 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
445 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
446 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
447 source: err.into(),
448 }),
449 }
450 }
451}
452impl From<crate::operation::update_application::UpdateApplicationError> for Error {
453 fn from(err: crate::operation::update_application::UpdateApplicationError) -> Self {
454 match err {
455 crate::operation::update_application::UpdateApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
456 crate::operation::update_application::UpdateApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
457 crate::operation::update_application::UpdateApplicationError::ValidationException(inner) => Error::ValidationException(inner),
458 crate::operation::update_application::UpdateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
459 }
460 }
461}
462impl ::std::error::Error for Error {
463 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
464 match self {
465 Error::ConflictException(inner) => inner.source(),
466 Error::InternalServerException(inner) => inner.source(),
467 Error::ResourceNotFoundException(inner) => inner.source(),
468 Error::ServiceQuotaExceededException(inner) => inner.source(),
469 Error::ValidationException(inner) => inner.source(),
470 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
471 }
472 }
473}
474impl ::aws_types::request_id::RequestId for Error {
475 fn request_id(&self) -> Option<&str> {
476 match self {
477 Self::ConflictException(e) => e.request_id(),
478 Self::InternalServerException(e) => e.request_id(),
479 Self::ResourceNotFoundException(e) => e.request_id(),
480 Self::ServiceQuotaExceededException(e) => e.request_id(),
481 Self::ValidationException(e) => e.request_id(),
482 Self::Unhandled(e) => e.meta.request_id(),
483 }
484 }
485}