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