1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 AutomationExecutionException(crate::types::error::AutomationExecutionException),
10 AutomationExecutionTimeoutException(crate::types::error::AutomationExecutionTimeoutException),
12 InternalServerException(crate::types::error::InternalServerException),
14 RequestTimeoutException(crate::types::error::RequestTimeoutException),
16 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
18 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
20 ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
22 ThrottlingException(crate::types::error::ThrottlingException),
24 ValidationException(crate::types::error::ValidationException),
26 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
28 variable wildcard pattern and check `.code()`:
29 \
30 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
31 \
32 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
33 Unhandled(crate::error::sealed_unhandled::Unhandled),
34}
35impl ::std::fmt::Display for Error {
36 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37 match self {
38 Error::AccessDeniedException(inner) => inner.fmt(f),
39 Error::AutomationExecutionException(inner) => inner.fmt(f),
40 Error::AutomationExecutionTimeoutException(inner) => inner.fmt(f),
41 Error::InternalServerException(inner) => inner.fmt(f),
42 Error::RequestTimeoutException(inner) => inner.fmt(f),
43 Error::ResourceNotFoundException(inner) => inner.fmt(f),
44 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
45 Error::ServiceUnavailableException(inner) => inner.fmt(f),
46 Error::ThrottlingException(inner) => inner.fmt(f),
47 Error::ValidationException(inner) => inner.fmt(f),
48 Error::Unhandled(_) => {
49 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
50 write!(f, "unhandled error ({code})")
51 } else {
52 f.write_str("unhandled error")
53 }
54 }
55 }
56 }
57}
58impl From<::aws_smithy_types::error::operation::BuildError> for Error {
59 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
60 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
61 source: value.into(),
62 meta: ::std::default::Default::default(),
63 })
64 }
65}
66impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
67 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
68 match self {
69 Self::AccessDeniedException(inner) => inner.meta(),
70 Self::AutomationExecutionException(inner) => inner.meta(),
71 Self::AutomationExecutionTimeoutException(inner) => inner.meta(),
72 Self::InternalServerException(inner) => inner.meta(),
73 Self::RequestTimeoutException(inner) => inner.meta(),
74 Self::ResourceNotFoundException(inner) => inner.meta(),
75 Self::ServiceQuotaExceededException(inner) => inner.meta(),
76 Self::ServiceUnavailableException(inner) => inner.meta(),
77 Self::ThrottlingException(inner) => inner.meta(),
78 Self::ValidationException(inner) => inner.meta(),
79 Self::Unhandled(inner) => &inner.meta,
80 }
81 }
82}
83impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_create_table_rows::BatchCreateTableRowsError, R>> for Error
84where
85 R: Send + Sync + std::fmt::Debug + 'static,
86{
87 fn from(
88 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_create_table_rows::BatchCreateTableRowsError, R>,
89 ) -> Self {
90 match err {
91 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
92 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
93 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
94 source: err.into(),
95 }),
96 }
97 }
98}
99impl From<crate::operation::batch_create_table_rows::BatchCreateTableRowsError> for Error {
100 fn from(err: crate::operation::batch_create_table_rows::BatchCreateTableRowsError) -> Self {
101 match err {
102 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
103 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::InternalServerException(inner) => {
104 Error::InternalServerException(inner)
105 }
106 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::RequestTimeoutException(inner) => {
107 Error::RequestTimeoutException(inner)
108 }
109 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::ResourceNotFoundException(inner) => {
110 Error::ResourceNotFoundException(inner)
111 }
112 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::ServiceQuotaExceededException(inner) => {
113 Error::ServiceQuotaExceededException(inner)
114 }
115 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::ServiceUnavailableException(inner) => {
116 Error::ServiceUnavailableException(inner)
117 }
118 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
119 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::ValidationException(inner) => Error::ValidationException(inner),
120 crate::operation::batch_create_table_rows::BatchCreateTableRowsError::Unhandled(inner) => Error::Unhandled(inner),
121 }
122 }
123}
124impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError, R>> for Error
125where
126 R: Send + Sync + std::fmt::Debug + 'static,
127{
128 fn from(
129 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError, R>,
130 ) -> Self {
131 match err {
132 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
133 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
134 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
135 source: err.into(),
136 }),
137 }
138 }
139}
140impl From<crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError> for Error {
141 fn from(err: crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError) -> Self {
142 match err {
143 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
144 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::InternalServerException(inner) => {
145 Error::InternalServerException(inner)
146 }
147 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::RequestTimeoutException(inner) => {
148 Error::RequestTimeoutException(inner)
149 }
150 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::ResourceNotFoundException(inner) => {
151 Error::ResourceNotFoundException(inner)
152 }
153 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::ServiceUnavailableException(inner) => {
154 Error::ServiceUnavailableException(inner)
155 }
156 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
157 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::ValidationException(inner) => Error::ValidationException(inner),
158 crate::operation::batch_delete_table_rows::BatchDeleteTableRowsError::Unhandled(inner) => Error::Unhandled(inner),
159 }
160 }
161}
162impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_update_table_rows::BatchUpdateTableRowsError, R>> for Error
163where
164 R: Send + Sync + std::fmt::Debug + 'static,
165{
166 fn from(
167 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_update_table_rows::BatchUpdateTableRowsError, R>,
168 ) -> Self {
169 match err {
170 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
171 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
172 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
173 source: err.into(),
174 }),
175 }
176 }
177}
178impl From<crate::operation::batch_update_table_rows::BatchUpdateTableRowsError> for Error {
179 fn from(err: crate::operation::batch_update_table_rows::BatchUpdateTableRowsError) -> Self {
180 match err {
181 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
182 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::InternalServerException(inner) => {
183 Error::InternalServerException(inner)
184 }
185 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::RequestTimeoutException(inner) => {
186 Error::RequestTimeoutException(inner)
187 }
188 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::ResourceNotFoundException(inner) => {
189 Error::ResourceNotFoundException(inner)
190 }
191 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::ServiceUnavailableException(inner) => {
192 Error::ServiceUnavailableException(inner)
193 }
194 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
195 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::ValidationException(inner) => Error::ValidationException(inner),
196 crate::operation::batch_update_table_rows::BatchUpdateTableRowsError::Unhandled(inner) => Error::Unhandled(inner),
197 }
198 }
199}
200impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError, R>> for Error
201where
202 R: Send + Sync + std::fmt::Debug + 'static,
203{
204 fn from(
205 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError, R>,
206 ) -> Self {
207 match err {
208 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
209 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
210 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
211 source: err.into(),
212 }),
213 }
214 }
215}
216impl From<crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError> for Error {
217 fn from(err: crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError) -> Self {
218 match err {
219 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
220 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::InternalServerException(inner) => {
221 Error::InternalServerException(inner)
222 }
223 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::RequestTimeoutException(inner) => {
224 Error::RequestTimeoutException(inner)
225 }
226 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::ResourceNotFoundException(inner) => {
227 Error::ResourceNotFoundException(inner)
228 }
229 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::ServiceQuotaExceededException(inner) => {
230 Error::ServiceQuotaExceededException(inner)
231 }
232 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::ServiceUnavailableException(inner) => {
233 Error::ServiceUnavailableException(inner)
234 }
235 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
236 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::ValidationException(inner) => Error::ValidationException(inner),
237 crate::operation::batch_upsert_table_rows::BatchUpsertTableRowsError::Unhandled(inner) => Error::Unhandled(inner),
238 }
239 }
240}
241impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError, R>>
242 for Error
243where
244 R: Send + Sync + std::fmt::Debug + 'static,
245{
246 fn from(
247 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError, R>,
248 ) -> Self {
249 match err {
250 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
251 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
252 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
253 source: err.into(),
254 }),
255 }
256 }
257}
258impl From<crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError> for Error {
259 fn from(err: crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError) -> Self {
260 match err {
261 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::AccessDeniedException(inner) => {
262 Error::AccessDeniedException(inner)
263 }
264 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::InternalServerException(inner) => {
265 Error::InternalServerException(inner)
266 }
267 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::RequestTimeoutException(inner) => {
268 Error::RequestTimeoutException(inner)
269 }
270 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::ResourceNotFoundException(inner) => {
271 Error::ResourceNotFoundException(inner)
272 }
273 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::ServiceUnavailableException(inner) => {
274 Error::ServiceUnavailableException(inner)
275 }
276 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::ThrottlingException(inner) => {
277 Error::ThrottlingException(inner)
278 }
279 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::ValidationException(inner) => {
280 Error::ValidationException(inner)
281 }
282 crate::operation::describe_table_data_import_job::DescribeTableDataImportJobError::Unhandled(inner) => Error::Unhandled(inner),
283 }
284 }
285}
286impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_screen_data::GetScreenDataError, 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::get_screen_data::GetScreenDataError, 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::get_screen_data::GetScreenDataError> for Error {
301 fn from(err: crate::operation::get_screen_data::GetScreenDataError) -> Self {
302 match err {
303 crate::operation::get_screen_data::GetScreenDataError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
304 crate::operation::get_screen_data::GetScreenDataError::InternalServerException(inner) => Error::InternalServerException(inner),
305 crate::operation::get_screen_data::GetScreenDataError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
306 crate::operation::get_screen_data::GetScreenDataError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
307 crate::operation::get_screen_data::GetScreenDataError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
308 crate::operation::get_screen_data::GetScreenDataError::ThrottlingException(inner) => Error::ThrottlingException(inner),
309 crate::operation::get_screen_data::GetScreenDataError::ValidationException(inner) => Error::ValidationException(inner),
310 crate::operation::get_screen_data::GetScreenDataError::Unhandled(inner) => Error::Unhandled(inner),
311 }
312 }
313}
314impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_screen_automation::InvokeScreenAutomationError, R>> for Error
315where
316 R: Send + Sync + std::fmt::Debug + 'static,
317{
318 fn from(
319 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_screen_automation::InvokeScreenAutomationError, R>,
320 ) -> Self {
321 match err {
322 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
323 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
324 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
325 source: err.into(),
326 }),
327 }
328 }
329}
330impl From<crate::operation::invoke_screen_automation::InvokeScreenAutomationError> for Error {
331 fn from(err: crate::operation::invoke_screen_automation::InvokeScreenAutomationError) -> Self {
332 match err {
333 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::AccessDeniedException(inner) => {
334 Error::AccessDeniedException(inner)
335 }
336 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::AutomationExecutionException(inner) => {
337 Error::AutomationExecutionException(inner)
338 }
339 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::AutomationExecutionTimeoutException(inner) => {
340 Error::AutomationExecutionTimeoutException(inner)
341 }
342 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::InternalServerException(inner) => {
343 Error::InternalServerException(inner)
344 }
345 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::RequestTimeoutException(inner) => {
346 Error::RequestTimeoutException(inner)
347 }
348 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::ResourceNotFoundException(inner) => {
349 Error::ResourceNotFoundException(inner)
350 }
351 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::ServiceQuotaExceededException(inner) => {
352 Error::ServiceQuotaExceededException(inner)
353 }
354 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::ServiceUnavailableException(inner) => {
355 Error::ServiceUnavailableException(inner)
356 }
357 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
358 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::ValidationException(inner) => Error::ValidationException(inner),
359 crate::operation::invoke_screen_automation::InvokeScreenAutomationError::Unhandled(inner) => Error::Unhandled(inner),
360 }
361 }
362}
363impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_table_columns::ListTableColumnsError, R>> for Error
364where
365 R: Send + Sync + std::fmt::Debug + 'static,
366{
367 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_table_columns::ListTableColumnsError, R>) -> Self {
368 match err {
369 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
370 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
371 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
372 source: err.into(),
373 }),
374 }
375 }
376}
377impl From<crate::operation::list_table_columns::ListTableColumnsError> for Error {
378 fn from(err: crate::operation::list_table_columns::ListTableColumnsError) -> Self {
379 match err {
380 crate::operation::list_table_columns::ListTableColumnsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
381 crate::operation::list_table_columns::ListTableColumnsError::InternalServerException(inner) => Error::InternalServerException(inner),
382 crate::operation::list_table_columns::ListTableColumnsError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
383 crate::operation::list_table_columns::ListTableColumnsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
384 crate::operation::list_table_columns::ListTableColumnsError::ServiceUnavailableException(inner) => {
385 Error::ServiceUnavailableException(inner)
386 }
387 crate::operation::list_table_columns::ListTableColumnsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
388 crate::operation::list_table_columns::ListTableColumnsError::ValidationException(inner) => Error::ValidationException(inner),
389 crate::operation::list_table_columns::ListTableColumnsError::Unhandled(inner) => Error::Unhandled(inner),
390 }
391 }
392}
393impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_table_rows::ListTableRowsError, R>> for Error
394where
395 R: Send + Sync + std::fmt::Debug + 'static,
396{
397 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_table_rows::ListTableRowsError, R>) -> Self {
398 match err {
399 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
400 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
401 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
402 source: err.into(),
403 }),
404 }
405 }
406}
407impl From<crate::operation::list_table_rows::ListTableRowsError> for Error {
408 fn from(err: crate::operation::list_table_rows::ListTableRowsError) -> Self {
409 match err {
410 crate::operation::list_table_rows::ListTableRowsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
411 crate::operation::list_table_rows::ListTableRowsError::InternalServerException(inner) => Error::InternalServerException(inner),
412 crate::operation::list_table_rows::ListTableRowsError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
413 crate::operation::list_table_rows::ListTableRowsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
414 crate::operation::list_table_rows::ListTableRowsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
415 crate::operation::list_table_rows::ListTableRowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
416 crate::operation::list_table_rows::ListTableRowsError::ValidationException(inner) => Error::ValidationException(inner),
417 crate::operation::list_table_rows::ListTableRowsError::Unhandled(inner) => Error::Unhandled(inner),
418 }
419 }
420}
421impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tables::ListTablesError, R>> for Error
422where
423 R: Send + Sync + std::fmt::Debug + 'static,
424{
425 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tables::ListTablesError, R>) -> Self {
426 match err {
427 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
428 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
429 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
430 source: err.into(),
431 }),
432 }
433 }
434}
435impl From<crate::operation::list_tables::ListTablesError> for Error {
436 fn from(err: crate::operation::list_tables::ListTablesError) -> Self {
437 match err {
438 crate::operation::list_tables::ListTablesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
439 crate::operation::list_tables::ListTablesError::InternalServerException(inner) => Error::InternalServerException(inner),
440 crate::operation::list_tables::ListTablesError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
441 crate::operation::list_tables::ListTablesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
442 crate::operation::list_tables::ListTablesError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
443 crate::operation::list_tables::ListTablesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
444 crate::operation::list_tables::ListTablesError::ValidationException(inner) => Error::ValidationException(inner),
445 crate::operation::list_tables::ListTablesError::Unhandled(inner) => Error::Unhandled(inner),
446 }
447 }
448}
449impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
450where
451 R: Send + Sync + std::fmt::Debug + 'static,
452{
453 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
454 match err {
455 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
456 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
457 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
458 source: err.into(),
459 }),
460 }
461 }
462}
463impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
464 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
465 match err {
466 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
467 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
468 Error::InternalServerException(inner)
469 }
470 crate::operation::list_tags_for_resource::ListTagsForResourceError::RequestTimeoutException(inner) => {
471 Error::RequestTimeoutException(inner)
472 }
473 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
474 Error::ResourceNotFoundException(inner)
475 }
476 crate::operation::list_tags_for_resource::ListTagsForResourceError::ServiceUnavailableException(inner) => {
477 Error::ServiceUnavailableException(inner)
478 }
479 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
480 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
481 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
482 }
483 }
484}
485impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_table_rows::QueryTableRowsError, R>> for Error
486where
487 R: Send + Sync + std::fmt::Debug + 'static,
488{
489 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::query_table_rows::QueryTableRowsError, R>) -> Self {
490 match err {
491 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
492 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
493 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
494 source: err.into(),
495 }),
496 }
497 }
498}
499impl From<crate::operation::query_table_rows::QueryTableRowsError> for Error {
500 fn from(err: crate::operation::query_table_rows::QueryTableRowsError) -> Self {
501 match err {
502 crate::operation::query_table_rows::QueryTableRowsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
503 crate::operation::query_table_rows::QueryTableRowsError::InternalServerException(inner) => Error::InternalServerException(inner),
504 crate::operation::query_table_rows::QueryTableRowsError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
505 crate::operation::query_table_rows::QueryTableRowsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
506 crate::operation::query_table_rows::QueryTableRowsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
507 crate::operation::query_table_rows::QueryTableRowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
508 crate::operation::query_table_rows::QueryTableRowsError::ValidationException(inner) => Error::ValidationException(inner),
509 crate::operation::query_table_rows::QueryTableRowsError::Unhandled(inner) => Error::Unhandled(inner),
510 }
511 }
512}
513impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_table_data_import_job::StartTableDataImportJobError, R>>
514 for Error
515where
516 R: Send + Sync + std::fmt::Debug + 'static,
517{
518 fn from(
519 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_table_data_import_job::StartTableDataImportJobError, R>,
520 ) -> Self {
521 match err {
522 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
523 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
524 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
525 source: err.into(),
526 }),
527 }
528 }
529}
530impl From<crate::operation::start_table_data_import_job::StartTableDataImportJobError> for Error {
531 fn from(err: crate::operation::start_table_data_import_job::StartTableDataImportJobError) -> Self {
532 match err {
533 crate::operation::start_table_data_import_job::StartTableDataImportJobError::AccessDeniedException(inner) => {
534 Error::AccessDeniedException(inner)
535 }
536 crate::operation::start_table_data_import_job::StartTableDataImportJobError::InternalServerException(inner) => {
537 Error::InternalServerException(inner)
538 }
539 crate::operation::start_table_data_import_job::StartTableDataImportJobError::RequestTimeoutException(inner) => {
540 Error::RequestTimeoutException(inner)
541 }
542 crate::operation::start_table_data_import_job::StartTableDataImportJobError::ResourceNotFoundException(inner) => {
543 Error::ResourceNotFoundException(inner)
544 }
545 crate::operation::start_table_data_import_job::StartTableDataImportJobError::ServiceQuotaExceededException(inner) => {
546 Error::ServiceQuotaExceededException(inner)
547 }
548 crate::operation::start_table_data_import_job::StartTableDataImportJobError::ServiceUnavailableException(inner) => {
549 Error::ServiceUnavailableException(inner)
550 }
551 crate::operation::start_table_data_import_job::StartTableDataImportJobError::ThrottlingException(inner) => {
552 Error::ThrottlingException(inner)
553 }
554 crate::operation::start_table_data_import_job::StartTableDataImportJobError::ValidationException(inner) => {
555 Error::ValidationException(inner)
556 }
557 crate::operation::start_table_data_import_job::StartTableDataImportJobError::Unhandled(inner) => Error::Unhandled(inner),
558 }
559 }
560}
561impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
562where
563 R: Send + Sync + std::fmt::Debug + 'static,
564{
565 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
566 match err {
567 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
568 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
569 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
570 source: err.into(),
571 }),
572 }
573 }
574}
575impl From<crate::operation::tag_resource::TagResourceError> for Error {
576 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
577 match err {
578 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
579 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
580 crate::operation::tag_resource::TagResourceError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
581 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
582 crate::operation::tag_resource::TagResourceError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
583 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
584 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
585 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
586 }
587 }
588}
589impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
590where
591 R: Send + Sync + std::fmt::Debug + 'static,
592{
593 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
594 match err {
595 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
596 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
597 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
598 source: err.into(),
599 }),
600 }
601 }
602}
603impl From<crate::operation::untag_resource::UntagResourceError> for Error {
604 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
605 match err {
606 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
607 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
608 crate::operation::untag_resource::UntagResourceError::RequestTimeoutException(inner) => Error::RequestTimeoutException(inner),
609 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
610 crate::operation::untag_resource::UntagResourceError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
611 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
612 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
613 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
614 }
615 }
616}
617impl ::std::error::Error for Error {
618 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
619 match self {
620 Error::AccessDeniedException(inner) => inner.source(),
621 Error::AutomationExecutionException(inner) => inner.source(),
622 Error::AutomationExecutionTimeoutException(inner) => inner.source(),
623 Error::InternalServerException(inner) => inner.source(),
624 Error::RequestTimeoutException(inner) => inner.source(),
625 Error::ResourceNotFoundException(inner) => inner.source(),
626 Error::ServiceQuotaExceededException(inner) => inner.source(),
627 Error::ServiceUnavailableException(inner) => inner.source(),
628 Error::ThrottlingException(inner) => inner.source(),
629 Error::ValidationException(inner) => inner.source(),
630 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
631 }
632 }
633}
634impl ::aws_types::request_id::RequestId for Error {
635 fn request_id(&self) -> Option<&str> {
636 match self {
637 Self::AccessDeniedException(e) => e.request_id(),
638 Self::AutomationExecutionException(e) => e.request_id(),
639 Self::AutomationExecutionTimeoutException(e) => e.request_id(),
640 Self::InternalServerException(e) => e.request_id(),
641 Self::RequestTimeoutException(e) => e.request_id(),
642 Self::ResourceNotFoundException(e) => e.request_id(),
643 Self::ServiceQuotaExceededException(e) => e.request_id(),
644 Self::ServiceUnavailableException(e) => e.request_id(),
645 Self::ThrottlingException(e) => e.request_id(),
646 Self::ValidationException(e) => e.request_id(),
647 Self::Unhandled(e) => e.meta.request_id(),
648 }
649 }
650}