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