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>
72 From<
73 ::aws_smithy_runtime_api::client::result::SdkError<
74 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError,
75 R,
76 >,
77 > for Error
78where
79 R: Send + Sync + std::fmt::Debug + 'static,
80{
81 fn from(
82 err: ::aws_smithy_runtime_api::client::result::SdkError<
83 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError,
84 R,
85 >,
86 ) -> Self {
87 match err {
88 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
89 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
90 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
91 source: err.into(),
92 }),
93 }
94 }
95}
96impl From<crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError> for Error {
97 fn from(err: crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError) -> Self {
98 match err {
99 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError::AccessDeniedException(inner) => {
100 Error::AccessDeniedException(inner)
101 }
102 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError::InternalServerException(inner) => {
103 Error::InternalServerException(inner)
104 }
105 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError::ResourceNotFoundException(inner) => {
106 Error::ResourceNotFoundException(inner)
107 }
108 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError::ThrottlingException(inner) => {
109 Error::ThrottlingException(inner)
110 }
111 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError::ValidationException(inner) => {
112 Error::ValidationException(inner)
113 }
114 crate::operation::batch_add_channel_role_to_accessors::BatchAddChannelRoleToAccessorsError::Unhandled(inner) => Error::Unhandled(inner),
115 }
116 }
117}
118impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_add_role::BatchAddRoleError, R>> for Error
119where
120 R: Send + Sync + std::fmt::Debug + 'static,
121{
122 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_add_role::BatchAddRoleError, R>) -> Self {
123 match err {
124 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
125 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
126 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
127 source: err.into(),
128 }),
129 }
130 }
131}
132impl From<crate::operation::batch_add_role::BatchAddRoleError> for Error {
133 fn from(err: crate::operation::batch_add_role::BatchAddRoleError) -> Self {
134 match err {
135 crate::operation::batch_add_role::BatchAddRoleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
136 crate::operation::batch_add_role::BatchAddRoleError::InternalServerException(inner) => Error::InternalServerException(inner),
137 crate::operation::batch_add_role::BatchAddRoleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
138 crate::operation::batch_add_role::BatchAddRoleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
139 crate::operation::batch_add_role::BatchAddRoleError::ValidationException(inner) => Error::ValidationException(inner),
140 crate::operation::batch_add_role::BatchAddRoleError::Unhandled(inner) => Error::Unhandled(inner),
141 }
142 }
143}
144impl<R>
145 From<
146 ::aws_smithy_runtime_api::client::result::SdkError<
147 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError,
148 R,
149 >,
150 > for Error
151where
152 R: Send + Sync + std::fmt::Debug + 'static,
153{
154 fn from(
155 err: ::aws_smithy_runtime_api::client::result::SdkError<
156 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError,
157 R,
158 >,
159 ) -> Self {
160 match err {
161 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
162 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
163 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
164 source: err.into(),
165 }),
166 }
167 }
168}
169impl From<crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError> for Error {
170 fn from(err: crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError) -> Self {
171 match err {
172 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError::AccessDeniedException(inner) => {
173 Error::AccessDeniedException(inner)
174 }
175 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError::InternalServerException(inner) => {
176 Error::InternalServerException(inner)
177 }
178 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError::ResourceNotFoundException(
179 inner,
180 ) => Error::ResourceNotFoundException(inner),
181 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError::ThrottlingException(inner) => {
182 Error::ThrottlingException(inner)
183 }
184 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError::ValidationException(inner) => {
185 Error::ValidationException(inner)
186 }
187 crate::operation::batch_remove_channel_role_from_accessors::BatchRemoveChannelRoleFromAccessorsError::Unhandled(inner) => {
188 Error::Unhandled(inner)
189 }
190 }
191 }
192}
193impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_remove_role::BatchRemoveRoleError, R>> for Error
194where
195 R: Send + Sync + std::fmt::Debug + 'static,
196{
197 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_remove_role::BatchRemoveRoleError, R>) -> Self {
198 match err {
199 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
200 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
201 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
202 source: err.into(),
203 }),
204 }
205 }
206}
207impl From<crate::operation::batch_remove_role::BatchRemoveRoleError> for Error {
208 fn from(err: crate::operation::batch_remove_role::BatchRemoveRoleError) -> Self {
209 match err {
210 crate::operation::batch_remove_role::BatchRemoveRoleError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
211 crate::operation::batch_remove_role::BatchRemoveRoleError::InternalServerException(inner) => Error::InternalServerException(inner),
212 crate::operation::batch_remove_role::BatchRemoveRoleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
213 crate::operation::batch_remove_role::BatchRemoveRoleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
214 crate::operation::batch_remove_role::BatchRemoveRoleError::ValidationException(inner) => Error::ValidationException(inner),
215 crate::operation::batch_remove_role::BatchRemoveRoleError::Unhandled(inner) => Error::Unhandled(inner),
216 }
217 }
218}
219impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_channel::CreateChannelError, R>> for Error
220where
221 R: Send + Sync + std::fmt::Debug + 'static,
222{
223 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_channel::CreateChannelError, R>) -> Self {
224 match err {
225 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
226 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
227 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
228 source: err.into(),
229 }),
230 }
231 }
232}
233impl From<crate::operation::create_channel::CreateChannelError> for Error {
234 fn from(err: crate::operation::create_channel::CreateChannelError) -> Self {
235 match err {
236 crate::operation::create_channel::CreateChannelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
237 crate::operation::create_channel::CreateChannelError::ConflictException(inner) => Error::ConflictException(inner),
238 crate::operation::create_channel::CreateChannelError::InternalServerException(inner) => Error::InternalServerException(inner),
239 crate::operation::create_channel::CreateChannelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
240 crate::operation::create_channel::CreateChannelError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
241 crate::operation::create_channel::CreateChannelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
242 crate::operation::create_channel::CreateChannelError::ValidationException(inner) => Error::ValidationException(inner),
243 crate::operation::create_channel::CreateChannelError::Unhandled(inner) => Error::Unhandled(inner),
244 }
245 }
246}
247impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_space::CreateSpaceError, 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::create_space::CreateSpaceError, 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::create_space::CreateSpaceError> for Error {
262 fn from(err: crate::operation::create_space::CreateSpaceError) -> Self {
263 match err {
264 crate::operation::create_space::CreateSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
265 crate::operation::create_space::CreateSpaceError::ConflictException(inner) => Error::ConflictException(inner),
266 crate::operation::create_space::CreateSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
267 crate::operation::create_space::CreateSpaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
268 crate::operation::create_space::CreateSpaceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
269 crate::operation::create_space::CreateSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
270 crate::operation::create_space::CreateSpaceError::ValidationException(inner) => Error::ValidationException(inner),
271 crate::operation::create_space::CreateSpaceError::Unhandled(inner) => Error::Unhandled(inner),
272 }
273 }
274}
275impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_space::DeleteSpaceError, R>> for Error
276where
277 R: Send + Sync + std::fmt::Debug + 'static,
278{
279 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_space::DeleteSpaceError, R>) -> Self {
280 match err {
281 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
282 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
283 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
284 source: err.into(),
285 }),
286 }
287 }
288}
289impl From<crate::operation::delete_space::DeleteSpaceError> for Error {
290 fn from(err: crate::operation::delete_space::DeleteSpaceError) -> Self {
291 match err {
292 crate::operation::delete_space::DeleteSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
293 crate::operation::delete_space::DeleteSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
294 crate::operation::delete_space::DeleteSpaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
295 crate::operation::delete_space::DeleteSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
296 crate::operation::delete_space::DeleteSpaceError::ValidationException(inner) => Error::ValidationException(inner),
297 crate::operation::delete_space::DeleteSpaceError::Unhandled(inner) => Error::Unhandled(inner),
298 }
299 }
300}
301impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_admin::DeregisterAdminError, R>> for Error
302where
303 R: Send + Sync + std::fmt::Debug + 'static,
304{
305 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::deregister_admin::DeregisterAdminError, R>) -> Self {
306 match err {
307 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
308 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
309 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
310 source: err.into(),
311 }),
312 }
313 }
314}
315impl From<crate::operation::deregister_admin::DeregisterAdminError> for Error {
316 fn from(err: crate::operation::deregister_admin::DeregisterAdminError) -> Self {
317 match err {
318 crate::operation::deregister_admin::DeregisterAdminError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
319 crate::operation::deregister_admin::DeregisterAdminError::InternalServerException(inner) => Error::InternalServerException(inner),
320 crate::operation::deregister_admin::DeregisterAdminError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
321 crate::operation::deregister_admin::DeregisterAdminError::ThrottlingException(inner) => Error::ThrottlingException(inner),
322 crate::operation::deregister_admin::DeregisterAdminError::ValidationException(inner) => Error::ValidationException(inner),
323 crate::operation::deregister_admin::DeregisterAdminError::Unhandled(inner) => Error::Unhandled(inner),
324 }
325 }
326}
327impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_channel::GetChannelError, R>> for Error
328where
329 R: Send + Sync + std::fmt::Debug + 'static,
330{
331 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_channel::GetChannelError, R>) -> Self {
332 match err {
333 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
334 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
335 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
336 source: err.into(),
337 }),
338 }
339 }
340}
341impl From<crate::operation::get_channel::GetChannelError> for Error {
342 fn from(err: crate::operation::get_channel::GetChannelError) -> Self {
343 match err {
344 crate::operation::get_channel::GetChannelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
345 crate::operation::get_channel::GetChannelError::InternalServerException(inner) => Error::InternalServerException(inner),
346 crate::operation::get_channel::GetChannelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
347 crate::operation::get_channel::GetChannelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
348 crate::operation::get_channel::GetChannelError::ValidationException(inner) => Error::ValidationException(inner),
349 crate::operation::get_channel::GetChannelError::Unhandled(inner) => Error::Unhandled(inner),
350 }
351 }
352}
353impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_space::GetSpaceError, R>> for Error
354where
355 R: Send + Sync + std::fmt::Debug + 'static,
356{
357 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_space::GetSpaceError, R>) -> Self {
358 match err {
359 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
360 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
361 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
362 source: err.into(),
363 }),
364 }
365 }
366}
367impl From<crate::operation::get_space::GetSpaceError> for Error {
368 fn from(err: crate::operation::get_space::GetSpaceError) -> Self {
369 match err {
370 crate::operation::get_space::GetSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
371 crate::operation::get_space::GetSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
372 crate::operation::get_space::GetSpaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
373 crate::operation::get_space::GetSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
374 crate::operation::get_space::GetSpaceError::ValidationException(inner) => Error::ValidationException(inner),
375 crate::operation::get_space::GetSpaceError::Unhandled(inner) => Error::Unhandled(inner),
376 }
377 }
378}
379impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_channels::ListChannelsError, R>> for Error
380where
381 R: Send + Sync + std::fmt::Debug + 'static,
382{
383 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_channels::ListChannelsError, R>) -> Self {
384 match err {
385 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
386 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
387 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
388 source: err.into(),
389 }),
390 }
391 }
392}
393impl From<crate::operation::list_channels::ListChannelsError> for Error {
394 fn from(err: crate::operation::list_channels::ListChannelsError) -> Self {
395 match err {
396 crate::operation::list_channels::ListChannelsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
397 crate::operation::list_channels::ListChannelsError::InternalServerException(inner) => Error::InternalServerException(inner),
398 crate::operation::list_channels::ListChannelsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
399 crate::operation::list_channels::ListChannelsError::ValidationException(inner) => Error::ValidationException(inner),
400 crate::operation::list_channels::ListChannelsError::Unhandled(inner) => Error::Unhandled(inner),
401 }
402 }
403}
404impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_spaces::ListSpacesError, R>> for Error
405where
406 R: Send + Sync + std::fmt::Debug + 'static,
407{
408 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_spaces::ListSpacesError, R>) -> Self {
409 match err {
410 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
411 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
412 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
413 source: err.into(),
414 }),
415 }
416 }
417}
418impl From<crate::operation::list_spaces::ListSpacesError> for Error {
419 fn from(err: crate::operation::list_spaces::ListSpacesError) -> Self {
420 match err {
421 crate::operation::list_spaces::ListSpacesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
422 crate::operation::list_spaces::ListSpacesError::InternalServerException(inner) => Error::InternalServerException(inner),
423 crate::operation::list_spaces::ListSpacesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
424 crate::operation::list_spaces::ListSpacesError::ValidationException(inner) => Error::ValidationException(inner),
425 crate::operation::list_spaces::ListSpacesError::Unhandled(inner) => Error::Unhandled(inner),
426 }
427 }
428}
429impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
430where
431 R: Send + Sync + std::fmt::Debug + 'static,
432{
433 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
434 match err {
435 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
436 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
437 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
438 source: err.into(),
439 }),
440 }
441 }
442}
443impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
444 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
445 match err {
446 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
447 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
448 Error::InternalServerException(inner)
449 }
450 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
451 Error::ResourceNotFoundException(inner)
452 }
453 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
454 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
455 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
456 }
457 }
458}
459impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_admin::RegisterAdminError, R>> for Error
460where
461 R: Send + Sync + std::fmt::Debug + 'static,
462{
463 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::register_admin::RegisterAdminError, R>) -> Self {
464 match err {
465 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
466 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
467 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
468 source: err.into(),
469 }),
470 }
471 }
472}
473impl From<crate::operation::register_admin::RegisterAdminError> for Error {
474 fn from(err: crate::operation::register_admin::RegisterAdminError) -> Self {
475 match err {
476 crate::operation::register_admin::RegisterAdminError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
477 crate::operation::register_admin::RegisterAdminError::InternalServerException(inner) => Error::InternalServerException(inner),
478 crate::operation::register_admin::RegisterAdminError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
479 crate::operation::register_admin::RegisterAdminError::ThrottlingException(inner) => Error::ThrottlingException(inner),
480 crate::operation::register_admin::RegisterAdminError::ValidationException(inner) => Error::ValidationException(inner),
481 crate::operation::register_admin::RegisterAdminError::Unhandled(inner) => Error::Unhandled(inner),
482 }
483 }
484}
485impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::send_invites::SendInvitesError, 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::send_invites::SendInvitesError, 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::send_invites::SendInvitesError> for Error {
500 fn from(err: crate::operation::send_invites::SendInvitesError) -> Self {
501 match err {
502 crate::operation::send_invites::SendInvitesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
503 crate::operation::send_invites::SendInvitesError::InternalServerException(inner) => Error::InternalServerException(inner),
504 crate::operation::send_invites::SendInvitesError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
505 crate::operation::send_invites::SendInvitesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
506 crate::operation::send_invites::SendInvitesError::ValidationException(inner) => Error::ValidationException(inner),
507 crate::operation::send_invites::SendInvitesError::Unhandled(inner) => Error::Unhandled(inner),
508 }
509 }
510}
511impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
512where
513 R: Send + Sync + std::fmt::Debug + 'static,
514{
515 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
516 match err {
517 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
518 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
519 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
520 source: err.into(),
521 }),
522 }
523 }
524}
525impl From<crate::operation::tag_resource::TagResourceError> for Error {
526 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
527 match err {
528 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
529 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
530 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
531 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
532 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
533 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
534 }
535 }
536}
537impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
538where
539 R: Send + Sync + std::fmt::Debug + 'static,
540{
541 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
542 match err {
543 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
544 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
545 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
546 source: err.into(),
547 }),
548 }
549 }
550}
551impl From<crate::operation::untag_resource::UntagResourceError> for Error {
552 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
553 match err {
554 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
555 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
556 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
557 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
558 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
559 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
560 }
561 }
562}
563impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_channel::UpdateChannelError, 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_channel::UpdateChannelError, 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_channel::UpdateChannelError> for Error {
578 fn from(err: crate::operation::update_channel::UpdateChannelError) -> Self {
579 match err {
580 crate::operation::update_channel::UpdateChannelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
581 crate::operation::update_channel::UpdateChannelError::ConflictException(inner) => Error::ConflictException(inner),
582 crate::operation::update_channel::UpdateChannelError::InternalServerException(inner) => Error::InternalServerException(inner),
583 crate::operation::update_channel::UpdateChannelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
584 crate::operation::update_channel::UpdateChannelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
585 crate::operation::update_channel::UpdateChannelError::ValidationException(inner) => Error::ValidationException(inner),
586 crate::operation::update_channel::UpdateChannelError::Unhandled(inner) => Error::Unhandled(inner),
587 }
588 }
589}
590impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_space::UpdateSpaceError, R>> for Error
591where
592 R: Send + Sync + std::fmt::Debug + 'static,
593{
594 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_space::UpdateSpaceError, R>) -> Self {
595 match err {
596 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
597 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
598 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
599 source: err.into(),
600 }),
601 }
602 }
603}
604impl From<crate::operation::update_space::UpdateSpaceError> for Error {
605 fn from(err: crate::operation::update_space::UpdateSpaceError) -> Self {
606 match err {
607 crate::operation::update_space::UpdateSpaceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
608 crate::operation::update_space::UpdateSpaceError::ConflictException(inner) => Error::ConflictException(inner),
609 crate::operation::update_space::UpdateSpaceError::InternalServerException(inner) => Error::InternalServerException(inner),
610 crate::operation::update_space::UpdateSpaceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
611 crate::operation::update_space::UpdateSpaceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
612 crate::operation::update_space::UpdateSpaceError::ValidationException(inner) => Error::ValidationException(inner),
613 crate::operation::update_space::UpdateSpaceError::Unhandled(inner) => Error::Unhandled(inner),
614 }
615 }
616}
617impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
618where
619 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
620 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
621{
622 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
623 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
624 meta: ::std::default::Default::default(),
625 source: err.into(),
626 })
627 }
628}
629impl ::std::error::Error for Error {
630 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
631 match self {
632 Error::AccessDeniedException(inner) => inner.source(),
633 Error::ConflictException(inner) => inner.source(),
634 Error::InternalServerException(inner) => inner.source(),
635 Error::ResourceNotFoundException(inner) => inner.source(),
636 Error::ServiceQuotaExceededException(inner) => inner.source(),
637 Error::ThrottlingException(inner) => inner.source(),
638 Error::ValidationException(inner) => inner.source(),
639 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
640 }
641 }
642}
643impl ::aws_types::request_id::RequestId for Error {
644 fn request_id(&self) -> Option<&str> {
645 match self {
646 Self::AccessDeniedException(e) => e.request_id(),
647 Self::ConflictException(e) => e.request_id(),
648 Self::InternalServerException(e) => e.request_id(),
649 Self::ResourceNotFoundException(e) => e.request_id(),
650 Self::ServiceQuotaExceededException(e) => e.request_id(),
651 Self::ThrottlingException(e) => e.request_id(),
652 Self::ValidationException(e) => e.request_id(),
653 Self::Unhandled(e) => e.meta.request_id(),
654 }
655 }
656}