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::add_stream_group_locations::AddStreamGroupLocationsError, R>>
72 for Error
73where
74 R: Send + Sync + std::fmt::Debug + 'static,
75{
76 fn from(
77 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_stream_group_locations::AddStreamGroupLocationsError, R>,
78 ) -> Self {
79 match err {
80 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
81 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
82 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
83 source: err.into(),
84 }),
85 }
86 }
87}
88impl From<crate::operation::add_stream_group_locations::AddStreamGroupLocationsError> for Error {
89 fn from(err: crate::operation::add_stream_group_locations::AddStreamGroupLocationsError) -> Self {
90 match err {
91 crate::operation::add_stream_group_locations::AddStreamGroupLocationsError::AccessDeniedException(inner) => {
92 Error::AccessDeniedException(inner)
93 }
94 crate::operation::add_stream_group_locations::AddStreamGroupLocationsError::InternalServerException(inner) => {
95 Error::InternalServerException(inner)
96 }
97 crate::operation::add_stream_group_locations::AddStreamGroupLocationsError::ResourceNotFoundException(inner) => {
98 Error::ResourceNotFoundException(inner)
99 }
100 crate::operation::add_stream_group_locations::AddStreamGroupLocationsError::ServiceQuotaExceededException(inner) => {
101 Error::ServiceQuotaExceededException(inner)
102 }
103 crate::operation::add_stream_group_locations::AddStreamGroupLocationsError::ThrottlingException(inner) => {
104 Error::ThrottlingException(inner)
105 }
106 crate::operation::add_stream_group_locations::AddStreamGroupLocationsError::ValidationException(inner) => {
107 Error::ValidationException(inner)
108 }
109 crate::operation::add_stream_group_locations::AddStreamGroupLocationsError::Unhandled(inner) => Error::Unhandled(inner),
110 }
111 }
112}
113impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_applications::AssociateApplicationsError, R>> for Error
114where
115 R: Send + Sync + std::fmt::Debug + 'static,
116{
117 fn from(
118 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_applications::AssociateApplicationsError, R>,
119 ) -> Self {
120 match err {
121 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
122 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
123 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
124 source: err.into(),
125 }),
126 }
127 }
128}
129impl From<crate::operation::associate_applications::AssociateApplicationsError> for Error {
130 fn from(err: crate::operation::associate_applications::AssociateApplicationsError) -> Self {
131 match err {
132 crate::operation::associate_applications::AssociateApplicationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
133 crate::operation::associate_applications::AssociateApplicationsError::InternalServerException(inner) => {
134 Error::InternalServerException(inner)
135 }
136 crate::operation::associate_applications::AssociateApplicationsError::ResourceNotFoundException(inner) => {
137 Error::ResourceNotFoundException(inner)
138 }
139 crate::operation::associate_applications::AssociateApplicationsError::ServiceQuotaExceededException(inner) => {
140 Error::ServiceQuotaExceededException(inner)
141 }
142 crate::operation::associate_applications::AssociateApplicationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
143 crate::operation::associate_applications::AssociateApplicationsError::ValidationException(inner) => Error::ValidationException(inner),
144 crate::operation::associate_applications::AssociateApplicationsError::Unhandled(inner) => Error::Unhandled(inner),
145 }
146 }
147}
148impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_application::CreateApplicationError, R>> for Error
149where
150 R: Send + Sync + std::fmt::Debug + 'static,
151{
152 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_application::CreateApplicationError, R>) -> Self {
153 match err {
154 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
155 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
156 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
157 source: err.into(),
158 }),
159 }
160 }
161}
162impl From<crate::operation::create_application::CreateApplicationError> for Error {
163 fn from(err: crate::operation::create_application::CreateApplicationError) -> Self {
164 match err {
165 crate::operation::create_application::CreateApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
166 crate::operation::create_application::CreateApplicationError::ConflictException(inner) => Error::ConflictException(inner),
167 crate::operation::create_application::CreateApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
168 crate::operation::create_application::CreateApplicationError::ServiceQuotaExceededException(inner) => {
169 Error::ServiceQuotaExceededException(inner)
170 }
171 crate::operation::create_application::CreateApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
172 crate::operation::create_application::CreateApplicationError::ValidationException(inner) => Error::ValidationException(inner),
173 crate::operation::create_application::CreateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
174 }
175 }
176}
177impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_stream_group::CreateStreamGroupError, R>> for Error
178where
179 R: Send + Sync + std::fmt::Debug + 'static,
180{
181 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_stream_group::CreateStreamGroupError, R>) -> Self {
182 match err {
183 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
184 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
185 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
186 source: err.into(),
187 }),
188 }
189 }
190}
191impl From<crate::operation::create_stream_group::CreateStreamGroupError> for Error {
192 fn from(err: crate::operation::create_stream_group::CreateStreamGroupError) -> Self {
193 match err {
194 crate::operation::create_stream_group::CreateStreamGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
195 crate::operation::create_stream_group::CreateStreamGroupError::ConflictException(inner) => Error::ConflictException(inner),
196 crate::operation::create_stream_group::CreateStreamGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
197 crate::operation::create_stream_group::CreateStreamGroupError::ResourceNotFoundException(inner) => {
198 Error::ResourceNotFoundException(inner)
199 }
200 crate::operation::create_stream_group::CreateStreamGroupError::ServiceQuotaExceededException(inner) => {
201 Error::ServiceQuotaExceededException(inner)
202 }
203 crate::operation::create_stream_group::CreateStreamGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
204 crate::operation::create_stream_group::CreateStreamGroupError::ValidationException(inner) => Error::ValidationException(inner),
205 crate::operation::create_stream_group::CreateStreamGroupError::Unhandled(inner) => Error::Unhandled(inner),
206 }
207 }
208}
209impl<R>
210 From<
211 ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError, R>,
212 > for Error
213where
214 R: Send + Sync + std::fmt::Debug + 'static,
215{
216 fn from(
217 err: ::aws_smithy_runtime_api::client::result::SdkError<
218 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError,
219 R,
220 >,
221 ) -> Self {
222 match err {
223 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
224 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
225 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
226 source: err.into(),
227 }),
228 }
229 }
230}
231impl From<crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError> for Error {
232 fn from(err: crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError) -> Self {
233 match err {
234 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError::AccessDeniedException(inner) => {
235 Error::AccessDeniedException(inner)
236 }
237 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError::ConflictException(inner) => {
238 Error::ConflictException(inner)
239 }
240 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError::InternalServerException(inner) => {
241 Error::InternalServerException(inner)
242 }
243 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError::ResourceNotFoundException(inner) => {
244 Error::ResourceNotFoundException(inner)
245 }
246 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError::ThrottlingException(inner) => {
247 Error::ThrottlingException(inner)
248 }
249 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError::ValidationException(inner) => {
250 Error::ValidationException(inner)
251 }
252 crate::operation::create_stream_session_connection::CreateStreamSessionConnectionError::Unhandled(inner) => Error::Unhandled(inner),
253 }
254 }
255}
256impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_application::DeleteApplicationError, R>> for Error
257where
258 R: Send + Sync + std::fmt::Debug + 'static,
259{
260 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_application::DeleteApplicationError, R>) -> Self {
261 match err {
262 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
263 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
264 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
265 source: err.into(),
266 }),
267 }
268 }
269}
270impl From<crate::operation::delete_application::DeleteApplicationError> for Error {
271 fn from(err: crate::operation::delete_application::DeleteApplicationError) -> Self {
272 match err {
273 crate::operation::delete_application::DeleteApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
274 crate::operation::delete_application::DeleteApplicationError::ConflictException(inner) => Error::ConflictException(inner),
275 crate::operation::delete_application::DeleteApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
276 crate::operation::delete_application::DeleteApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
277 crate::operation::delete_application::DeleteApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
278 crate::operation::delete_application::DeleteApplicationError::ValidationException(inner) => Error::ValidationException(inner),
279 crate::operation::delete_application::DeleteApplicationError::Unhandled(inner) => Error::Unhandled(inner),
280 }
281 }
282}
283impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_stream_group::DeleteStreamGroupError, R>> for Error
284where
285 R: Send + Sync + std::fmt::Debug + 'static,
286{
287 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_stream_group::DeleteStreamGroupError, R>) -> Self {
288 match err {
289 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
290 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
291 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
292 source: err.into(),
293 }),
294 }
295 }
296}
297impl From<crate::operation::delete_stream_group::DeleteStreamGroupError> for Error {
298 fn from(err: crate::operation::delete_stream_group::DeleteStreamGroupError) -> Self {
299 match err {
300 crate::operation::delete_stream_group::DeleteStreamGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
301 crate::operation::delete_stream_group::DeleteStreamGroupError::ConflictException(inner) => Error::ConflictException(inner),
302 crate::operation::delete_stream_group::DeleteStreamGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
303 crate::operation::delete_stream_group::DeleteStreamGroupError::ResourceNotFoundException(inner) => {
304 Error::ResourceNotFoundException(inner)
305 }
306 crate::operation::delete_stream_group::DeleteStreamGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
307 crate::operation::delete_stream_group::DeleteStreamGroupError::ValidationException(inner) => Error::ValidationException(inner),
308 crate::operation::delete_stream_group::DeleteStreamGroupError::Unhandled(inner) => Error::Unhandled(inner),
309 }
310 }
311}
312impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_applications::DisassociateApplicationsError, R>>
313 for Error
314where
315 R: Send + Sync + std::fmt::Debug + 'static,
316{
317 fn from(
318 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_applications::DisassociateApplicationsError, R>,
319 ) -> Self {
320 match err {
321 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
322 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
323 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
324 source: err.into(),
325 }),
326 }
327 }
328}
329impl From<crate::operation::disassociate_applications::DisassociateApplicationsError> for Error {
330 fn from(err: crate::operation::disassociate_applications::DisassociateApplicationsError) -> Self {
331 match err {
332 crate::operation::disassociate_applications::DisassociateApplicationsError::AccessDeniedException(inner) => {
333 Error::AccessDeniedException(inner)
334 }
335 crate::operation::disassociate_applications::DisassociateApplicationsError::InternalServerException(inner) => {
336 Error::InternalServerException(inner)
337 }
338 crate::operation::disassociate_applications::DisassociateApplicationsError::ResourceNotFoundException(inner) => {
339 Error::ResourceNotFoundException(inner)
340 }
341 crate::operation::disassociate_applications::DisassociateApplicationsError::ThrottlingException(inner) => {
342 Error::ThrottlingException(inner)
343 }
344 crate::operation::disassociate_applications::DisassociateApplicationsError::ValidationException(inner) => {
345 Error::ValidationException(inner)
346 }
347 crate::operation::disassociate_applications::DisassociateApplicationsError::Unhandled(inner) => Error::Unhandled(inner),
348 }
349 }
350}
351impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_stream_session_files::ExportStreamSessionFilesError, R>>
352 for Error
353where
354 R: Send + Sync + std::fmt::Debug + 'static,
355{
356 fn from(
357 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_stream_session_files::ExportStreamSessionFilesError, R>,
358 ) -> Self {
359 match err {
360 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
361 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
362 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
363 source: err.into(),
364 }),
365 }
366 }
367}
368impl From<crate::operation::export_stream_session_files::ExportStreamSessionFilesError> for Error {
369 fn from(err: crate::operation::export_stream_session_files::ExportStreamSessionFilesError) -> Self {
370 match err {
371 crate::operation::export_stream_session_files::ExportStreamSessionFilesError::AccessDeniedException(inner) => {
372 Error::AccessDeniedException(inner)
373 }
374 crate::operation::export_stream_session_files::ExportStreamSessionFilesError::InternalServerException(inner) => {
375 Error::InternalServerException(inner)
376 }
377 crate::operation::export_stream_session_files::ExportStreamSessionFilesError::ResourceNotFoundException(inner) => {
378 Error::ResourceNotFoundException(inner)
379 }
380 crate::operation::export_stream_session_files::ExportStreamSessionFilesError::ThrottlingException(inner) => {
381 Error::ThrottlingException(inner)
382 }
383 crate::operation::export_stream_session_files::ExportStreamSessionFilesError::ValidationException(inner) => {
384 Error::ValidationException(inner)
385 }
386 crate::operation::export_stream_session_files::ExportStreamSessionFilesError::Unhandled(inner) => Error::Unhandled(inner),
387 }
388 }
389}
390impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>> for Error
391where
392 R: Send + Sync + std::fmt::Debug + 'static,
393{
394 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>) -> Self {
395 match err {
396 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
397 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
398 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
399 source: err.into(),
400 }),
401 }
402 }
403}
404impl From<crate::operation::get_application::GetApplicationError> for Error {
405 fn from(err: crate::operation::get_application::GetApplicationError) -> Self {
406 match err {
407 crate::operation::get_application::GetApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
408 crate::operation::get_application::GetApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
409 crate::operation::get_application::GetApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
410 crate::operation::get_application::GetApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
411 crate::operation::get_application::GetApplicationError::ValidationException(inner) => Error::ValidationException(inner),
412 crate::operation::get_application::GetApplicationError::Unhandled(inner) => Error::Unhandled(inner),
413 }
414 }
415}
416impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_group::GetStreamGroupError, R>> for Error
417where
418 R: Send + Sync + std::fmt::Debug + 'static,
419{
420 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_group::GetStreamGroupError, R>) -> Self {
421 match err {
422 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
423 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
424 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
425 source: err.into(),
426 }),
427 }
428 }
429}
430impl From<crate::operation::get_stream_group::GetStreamGroupError> for Error {
431 fn from(err: crate::operation::get_stream_group::GetStreamGroupError) -> Self {
432 match err {
433 crate::operation::get_stream_group::GetStreamGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
434 crate::operation::get_stream_group::GetStreamGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
435 crate::operation::get_stream_group::GetStreamGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
436 crate::operation::get_stream_group::GetStreamGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
437 crate::operation::get_stream_group::GetStreamGroupError::ValidationException(inner) => Error::ValidationException(inner),
438 crate::operation::get_stream_group::GetStreamGroupError::Unhandled(inner) => Error::Unhandled(inner),
439 }
440 }
441}
442impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_session::GetStreamSessionError, R>> for Error
443where
444 R: Send + Sync + std::fmt::Debug + 'static,
445{
446 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_stream_session::GetStreamSessionError, R>) -> Self {
447 match err {
448 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
449 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
450 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
451 source: err.into(),
452 }),
453 }
454 }
455}
456impl From<crate::operation::get_stream_session::GetStreamSessionError> for Error {
457 fn from(err: crate::operation::get_stream_session::GetStreamSessionError) -> Self {
458 match err {
459 crate::operation::get_stream_session::GetStreamSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
460 crate::operation::get_stream_session::GetStreamSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
461 crate::operation::get_stream_session::GetStreamSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
462 crate::operation::get_stream_session::GetStreamSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
463 crate::operation::get_stream_session::GetStreamSessionError::ValidationException(inner) => Error::ValidationException(inner),
464 crate::operation::get_stream_session::GetStreamSessionError::Unhandled(inner) => Error::Unhandled(inner),
465 }
466 }
467}
468impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_applications::ListApplicationsError, R>> for Error
469where
470 R: Send + Sync + std::fmt::Debug + 'static,
471{
472 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_applications::ListApplicationsError, R>) -> Self {
473 match err {
474 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
475 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
476 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
477 source: err.into(),
478 }),
479 }
480 }
481}
482impl From<crate::operation::list_applications::ListApplicationsError> for Error {
483 fn from(err: crate::operation::list_applications::ListApplicationsError) -> Self {
484 match err {
485 crate::operation::list_applications::ListApplicationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
486 crate::operation::list_applications::ListApplicationsError::InternalServerException(inner) => Error::InternalServerException(inner),
487 crate::operation::list_applications::ListApplicationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
488 crate::operation::list_applications::ListApplicationsError::ValidationException(inner) => Error::ValidationException(inner),
489 crate::operation::list_applications::ListApplicationsError::Unhandled(inner) => Error::Unhandled(inner),
490 }
491 }
492}
493impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_groups::ListStreamGroupsError, R>> for Error
494where
495 R: Send + Sync + std::fmt::Debug + 'static,
496{
497 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_groups::ListStreamGroupsError, R>) -> Self {
498 match err {
499 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
500 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
501 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
502 source: err.into(),
503 }),
504 }
505 }
506}
507impl From<crate::operation::list_stream_groups::ListStreamGroupsError> for Error {
508 fn from(err: crate::operation::list_stream_groups::ListStreamGroupsError) -> Self {
509 match err {
510 crate::operation::list_stream_groups::ListStreamGroupsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
511 crate::operation::list_stream_groups::ListStreamGroupsError::InternalServerException(inner) => Error::InternalServerException(inner),
512 crate::operation::list_stream_groups::ListStreamGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
513 crate::operation::list_stream_groups::ListStreamGroupsError::ValidationException(inner) => Error::ValidationException(inner),
514 crate::operation::list_stream_groups::ListStreamGroupsError::Unhandled(inner) => Error::Unhandled(inner),
515 }
516 }
517}
518impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_sessions::ListStreamSessionsError, R>> for Error
519where
520 R: Send + Sync + std::fmt::Debug + 'static,
521{
522 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_sessions::ListStreamSessionsError, R>) -> Self {
523 match err {
524 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
525 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
526 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
527 source: err.into(),
528 }),
529 }
530 }
531}
532impl From<crate::operation::list_stream_sessions::ListStreamSessionsError> for Error {
533 fn from(err: crate::operation::list_stream_sessions::ListStreamSessionsError) -> Self {
534 match err {
535 crate::operation::list_stream_sessions::ListStreamSessionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
536 crate::operation::list_stream_sessions::ListStreamSessionsError::InternalServerException(inner) => Error::InternalServerException(inner),
537 crate::operation::list_stream_sessions::ListStreamSessionsError::ResourceNotFoundException(inner) => {
538 Error::ResourceNotFoundException(inner)
539 }
540 crate::operation::list_stream_sessions::ListStreamSessionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
541 crate::operation::list_stream_sessions::ListStreamSessionsError::ValidationException(inner) => Error::ValidationException(inner),
542 crate::operation::list_stream_sessions::ListStreamSessionsError::Unhandled(inner) => Error::Unhandled(inner),
543 }
544 }
545}
546impl<R>
547 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError, R>>
548 for Error
549where
550 R: Send + Sync + std::fmt::Debug + 'static,
551{
552 fn from(
553 err: ::aws_smithy_runtime_api::client::result::SdkError<
554 crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError,
555 R,
556 >,
557 ) -> Self {
558 match err {
559 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
560 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
561 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
562 source: err.into(),
563 }),
564 }
565 }
566}
567impl From<crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError> for Error {
568 fn from(err: crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError) -> Self {
569 match err {
570 crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError::AccessDeniedException(inner) => {
571 Error::AccessDeniedException(inner)
572 }
573 crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError::InternalServerException(inner) => {
574 Error::InternalServerException(inner)
575 }
576 crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError::ThrottlingException(inner) => {
577 Error::ThrottlingException(inner)
578 }
579 crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError::ValidationException(inner) => {
580 Error::ValidationException(inner)
581 }
582 crate::operation::list_stream_sessions_by_account::ListStreamSessionsByAccountError::Unhandled(inner) => Error::Unhandled(inner),
583 }
584 }
585}
586impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
587where
588 R: Send + Sync + std::fmt::Debug + 'static,
589{
590 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
591 match err {
592 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
593 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
594 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
595 source: err.into(),
596 }),
597 }
598 }
599}
600impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
601 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
602 match err {
603 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
604 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
605 Error::InternalServerException(inner)
606 }
607 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
608 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
609 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
610 }
611 }
612}
613impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError, R>>
614 for Error
615where
616 R: Send + Sync + std::fmt::Debug + 'static,
617{
618 fn from(
619 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError, R>,
620 ) -> Self {
621 match err {
622 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
623 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
624 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
625 source: err.into(),
626 }),
627 }
628 }
629}
630impl From<crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError> for Error {
631 fn from(err: crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError) -> Self {
632 match err {
633 crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError::AccessDeniedException(inner) => {
634 Error::AccessDeniedException(inner)
635 }
636 crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError::InternalServerException(inner) => {
637 Error::InternalServerException(inner)
638 }
639 crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError::ResourceNotFoundException(inner) => {
640 Error::ResourceNotFoundException(inner)
641 }
642 crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError::ThrottlingException(inner) => {
643 Error::ThrottlingException(inner)
644 }
645 crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError::ValidationException(inner) => {
646 Error::ValidationException(inner)
647 }
648 crate::operation::remove_stream_group_locations::RemoveStreamGroupLocationsError::Unhandled(inner) => Error::Unhandled(inner),
649 }
650 }
651}
652impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_stream_session::StartStreamSessionError, R>> for Error
653where
654 R: Send + Sync + std::fmt::Debug + 'static,
655{
656 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_stream_session::StartStreamSessionError, R>) -> Self {
657 match err {
658 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
659 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
660 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
661 source: err.into(),
662 }),
663 }
664 }
665}
666impl From<crate::operation::start_stream_session::StartStreamSessionError> for Error {
667 fn from(err: crate::operation::start_stream_session::StartStreamSessionError) -> Self {
668 match err {
669 crate::operation::start_stream_session::StartStreamSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
670 crate::operation::start_stream_session::StartStreamSessionError::ConflictException(inner) => Error::ConflictException(inner),
671 crate::operation::start_stream_session::StartStreamSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
672 crate::operation::start_stream_session::StartStreamSessionError::ResourceNotFoundException(inner) => {
673 Error::ResourceNotFoundException(inner)
674 }
675 crate::operation::start_stream_session::StartStreamSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
676 crate::operation::start_stream_session::StartStreamSessionError::ValidationException(inner) => Error::ValidationException(inner),
677 crate::operation::start_stream_session::StartStreamSessionError::Unhandled(inner) => Error::Unhandled(inner),
678 }
679 }
680}
681impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
682where
683 R: Send + Sync + std::fmt::Debug + 'static,
684{
685 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
686 match err {
687 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
688 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
689 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
690 source: err.into(),
691 }),
692 }
693 }
694}
695impl From<crate::operation::tag_resource::TagResourceError> for Error {
696 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
697 match err {
698 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
699 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
700 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
701 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
702 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
703 }
704 }
705}
706impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_stream_session::TerminateStreamSessionError, R>> for Error
707where
708 R: Send + Sync + std::fmt::Debug + 'static,
709{
710 fn from(
711 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::terminate_stream_session::TerminateStreamSessionError, R>,
712 ) -> Self {
713 match err {
714 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
715 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
716 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
717 source: err.into(),
718 }),
719 }
720 }
721}
722impl From<crate::operation::terminate_stream_session::TerminateStreamSessionError> for Error {
723 fn from(err: crate::operation::terminate_stream_session::TerminateStreamSessionError) -> Self {
724 match err {
725 crate::operation::terminate_stream_session::TerminateStreamSessionError::AccessDeniedException(inner) => {
726 Error::AccessDeniedException(inner)
727 }
728 crate::operation::terminate_stream_session::TerminateStreamSessionError::InternalServerException(inner) => {
729 Error::InternalServerException(inner)
730 }
731 crate::operation::terminate_stream_session::TerminateStreamSessionError::ResourceNotFoundException(inner) => {
732 Error::ResourceNotFoundException(inner)
733 }
734 crate::operation::terminate_stream_session::TerminateStreamSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
735 crate::operation::terminate_stream_session::TerminateStreamSessionError::ValidationException(inner) => Error::ValidationException(inner),
736 crate::operation::terminate_stream_session::TerminateStreamSessionError::Unhandled(inner) => Error::Unhandled(inner),
737 }
738 }
739}
740impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
741where
742 R: Send + Sync + std::fmt::Debug + 'static,
743{
744 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
745 match err {
746 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
747 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
748 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
749 source: err.into(),
750 }),
751 }
752 }
753}
754impl From<crate::operation::untag_resource::UntagResourceError> for Error {
755 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
756 match err {
757 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
758 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
759 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
760 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
761 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
762 }
763 }
764}
765impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application::UpdateApplicationError, R>> for Error
766where
767 R: Send + Sync + std::fmt::Debug + 'static,
768{
769 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application::UpdateApplicationError, R>) -> Self {
770 match err {
771 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
772 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
773 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
774 source: err.into(),
775 }),
776 }
777 }
778}
779impl From<crate::operation::update_application::UpdateApplicationError> for Error {
780 fn from(err: crate::operation::update_application::UpdateApplicationError) -> Self {
781 match err {
782 crate::operation::update_application::UpdateApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
783 crate::operation::update_application::UpdateApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
784 crate::operation::update_application::UpdateApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
785 crate::operation::update_application::UpdateApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
786 crate::operation::update_application::UpdateApplicationError::ValidationException(inner) => Error::ValidationException(inner),
787 crate::operation::update_application::UpdateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
788 }
789 }
790}
791impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_stream_group::UpdateStreamGroupError, R>> for Error
792where
793 R: Send + Sync + std::fmt::Debug + 'static,
794{
795 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_stream_group::UpdateStreamGroupError, R>) -> Self {
796 match err {
797 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
798 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
799 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
800 source: err.into(),
801 }),
802 }
803 }
804}
805impl From<crate::operation::update_stream_group::UpdateStreamGroupError> for Error {
806 fn from(err: crate::operation::update_stream_group::UpdateStreamGroupError) -> Self {
807 match err {
808 crate::operation::update_stream_group::UpdateStreamGroupError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
809 crate::operation::update_stream_group::UpdateStreamGroupError::ConflictException(inner) => Error::ConflictException(inner),
810 crate::operation::update_stream_group::UpdateStreamGroupError::InternalServerException(inner) => Error::InternalServerException(inner),
811 crate::operation::update_stream_group::UpdateStreamGroupError::ResourceNotFoundException(inner) => {
812 Error::ResourceNotFoundException(inner)
813 }
814 crate::operation::update_stream_group::UpdateStreamGroupError::ServiceQuotaExceededException(inner) => {
815 Error::ServiceQuotaExceededException(inner)
816 }
817 crate::operation::update_stream_group::UpdateStreamGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
818 crate::operation::update_stream_group::UpdateStreamGroupError::ValidationException(inner) => Error::ValidationException(inner),
819 crate::operation::update_stream_group::UpdateStreamGroupError::Unhandled(inner) => Error::Unhandled(inner),
820 }
821 }
822}
823impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
824where
825 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
826 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
827{
828 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
829 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
830 meta: ::std::default::Default::default(),
831 source: err.into(),
832 })
833 }
834}
835impl ::std::error::Error for Error {
836 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
837 match self {
838 Error::AccessDeniedException(inner) => inner.source(),
839 Error::ConflictException(inner) => inner.source(),
840 Error::InternalServerException(inner) => inner.source(),
841 Error::ResourceNotFoundException(inner) => inner.source(),
842 Error::ServiceQuotaExceededException(inner) => inner.source(),
843 Error::ThrottlingException(inner) => inner.source(),
844 Error::ValidationException(inner) => inner.source(),
845 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
846 }
847 }
848}
849impl ::aws_types::request_id::RequestId for Error {
850 fn request_id(&self) -> Option<&str> {
851 match self {
852 Self::AccessDeniedException(e) => e.request_id(),
853 Self::ConflictException(e) => e.request_id(),
854 Self::InternalServerException(e) => e.request_id(),
855 Self::ResourceNotFoundException(e) => e.request_id(),
856 Self::ServiceQuotaExceededException(e) => e.request_id(),
857 Self::ThrottlingException(e) => e.request_id(),
858 Self::ValidationException(e) => e.request_id(),
859 Self::Unhandled(e) => e.meta.request_id(),
860 }
861 }
862}