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