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