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 OperationTimeoutException(crate::types::error::OperationTimeoutException),
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::OperationTimeoutException(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::OperationTimeoutException(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_workflow::CreateWorkflowError, 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_workflow::CreateWorkflowError, 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_workflow::CreateWorkflowError> for Error {
90 fn from(err: crate::operation::create_workflow::CreateWorkflowError) -> Self {
91 match err {
92 crate::operation::create_workflow::CreateWorkflowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
93 crate::operation::create_workflow::CreateWorkflowError::ConflictException(inner) => Error::ConflictException(inner),
94 crate::operation::create_workflow::CreateWorkflowError::InternalServerException(inner) => Error::InternalServerException(inner),
95 crate::operation::create_workflow::CreateWorkflowError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
96 crate::operation::create_workflow::CreateWorkflowError::ServiceQuotaExceededException(inner) => {
97 Error::ServiceQuotaExceededException(inner)
98 }
99 crate::operation::create_workflow::CreateWorkflowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
100 crate::operation::create_workflow::CreateWorkflowError::ValidationException(inner) => Error::ValidationException(inner),
101 crate::operation::create_workflow::CreateWorkflowError::Unhandled(inner) => Error::Unhandled(inner),
102 }
103 }
104}
105impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_workflow::DeleteWorkflowError, R>> for Error
106where
107 R: Send + Sync + std::fmt::Debug + 'static,
108{
109 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_workflow::DeleteWorkflowError, R>) -> Self {
110 match err {
111 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
112 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
113 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
114 source: err.into(),
115 }),
116 }
117 }
118}
119impl From<crate::operation::delete_workflow::DeleteWorkflowError> for Error {
120 fn from(err: crate::operation::delete_workflow::DeleteWorkflowError) -> Self {
121 match err {
122 crate::operation::delete_workflow::DeleteWorkflowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
123 crate::operation::delete_workflow::DeleteWorkflowError::InternalServerException(inner) => Error::InternalServerException(inner),
124 crate::operation::delete_workflow::DeleteWorkflowError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
125 crate::operation::delete_workflow::DeleteWorkflowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
126 crate::operation::delete_workflow::DeleteWorkflowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
127 crate::operation::delete_workflow::DeleteWorkflowError::ValidationException(inner) => Error::ValidationException(inner),
128 crate::operation::delete_workflow::DeleteWorkflowError::Unhandled(inner) => Error::Unhandled(inner),
129 }
130 }
131}
132impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_task_instance::GetTaskInstanceError, R>> for Error
133where
134 R: Send + Sync + std::fmt::Debug + 'static,
135{
136 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_task_instance::GetTaskInstanceError, R>) -> Self {
137 match err {
138 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
139 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
140 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
141 source: err.into(),
142 }),
143 }
144 }
145}
146impl From<crate::operation::get_task_instance::GetTaskInstanceError> for Error {
147 fn from(err: crate::operation::get_task_instance::GetTaskInstanceError) -> Self {
148 match err {
149 crate::operation::get_task_instance::GetTaskInstanceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
150 crate::operation::get_task_instance::GetTaskInstanceError::InternalServerException(inner) => Error::InternalServerException(inner),
151 crate::operation::get_task_instance::GetTaskInstanceError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
152 crate::operation::get_task_instance::GetTaskInstanceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
153 crate::operation::get_task_instance::GetTaskInstanceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
154 crate::operation::get_task_instance::GetTaskInstanceError::ValidationException(inner) => Error::ValidationException(inner),
155 crate::operation::get_task_instance::GetTaskInstanceError::Unhandled(inner) => Error::Unhandled(inner),
156 }
157 }
158}
159impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_workflow::GetWorkflowError, R>> for Error
160where
161 R: Send + Sync + std::fmt::Debug + 'static,
162{
163 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_workflow::GetWorkflowError, R>) -> Self {
164 match err {
165 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
166 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
167 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
168 source: err.into(),
169 }),
170 }
171 }
172}
173impl From<crate::operation::get_workflow::GetWorkflowError> for Error {
174 fn from(err: crate::operation::get_workflow::GetWorkflowError) -> Self {
175 match err {
176 crate::operation::get_workflow::GetWorkflowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
177 crate::operation::get_workflow::GetWorkflowError::InternalServerException(inner) => Error::InternalServerException(inner),
178 crate::operation::get_workflow::GetWorkflowError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
179 crate::operation::get_workflow::GetWorkflowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
180 crate::operation::get_workflow::GetWorkflowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
181 crate::operation::get_workflow::GetWorkflowError::ValidationException(inner) => Error::ValidationException(inner),
182 crate::operation::get_workflow::GetWorkflowError::Unhandled(inner) => Error::Unhandled(inner),
183 }
184 }
185}
186impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_workflow_run::GetWorkflowRunError, R>> for Error
187where
188 R: Send + Sync + std::fmt::Debug + 'static,
189{
190 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_workflow_run::GetWorkflowRunError, R>) -> Self {
191 match err {
192 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
193 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
194 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
195 source: err.into(),
196 }),
197 }
198 }
199}
200impl From<crate::operation::get_workflow_run::GetWorkflowRunError> for Error {
201 fn from(err: crate::operation::get_workflow_run::GetWorkflowRunError) -> Self {
202 match err {
203 crate::operation::get_workflow_run::GetWorkflowRunError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
204 crate::operation::get_workflow_run::GetWorkflowRunError::InternalServerException(inner) => Error::InternalServerException(inner),
205 crate::operation::get_workflow_run::GetWorkflowRunError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
206 crate::operation::get_workflow_run::GetWorkflowRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
207 crate::operation::get_workflow_run::GetWorkflowRunError::ThrottlingException(inner) => Error::ThrottlingException(inner),
208 crate::operation::get_workflow_run::GetWorkflowRunError::ValidationException(inner) => Error::ValidationException(inner),
209 crate::operation::get_workflow_run::GetWorkflowRunError::Unhandled(inner) => Error::Unhandled(inner),
210 }
211 }
212}
213impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
214where
215 R: Send + Sync + std::fmt::Debug + 'static,
216{
217 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
218 match err {
219 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
220 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
221 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
222 source: err.into(),
223 }),
224 }
225 }
226}
227impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
228 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
229 match err {
230 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
231 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
232 Error::InternalServerException(inner)
233 }
234 crate::operation::list_tags_for_resource::ListTagsForResourceError::OperationTimeoutException(inner) => {
235 Error::OperationTimeoutException(inner)
236 }
237 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
238 Error::ResourceNotFoundException(inner)
239 }
240 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
241 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
242 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
243 }
244 }
245}
246impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_task_instances::ListTaskInstancesError, R>> for Error
247where
248 R: Send + Sync + std::fmt::Debug + 'static,
249{
250 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_task_instances::ListTaskInstancesError, R>) -> Self {
251 match err {
252 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
253 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
254 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
255 source: err.into(),
256 }),
257 }
258 }
259}
260impl From<crate::operation::list_task_instances::ListTaskInstancesError> for Error {
261 fn from(err: crate::operation::list_task_instances::ListTaskInstancesError) -> Self {
262 match err {
263 crate::operation::list_task_instances::ListTaskInstancesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
264 crate::operation::list_task_instances::ListTaskInstancesError::InternalServerException(inner) => Error::InternalServerException(inner),
265 crate::operation::list_task_instances::ListTaskInstancesError::OperationTimeoutException(inner) => {
266 Error::OperationTimeoutException(inner)
267 }
268 crate::operation::list_task_instances::ListTaskInstancesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
269 crate::operation::list_task_instances::ListTaskInstancesError::ValidationException(inner) => Error::ValidationException(inner),
270 crate::operation::list_task_instances::ListTaskInstancesError::Unhandled(inner) => Error::Unhandled(inner),
271 }
272 }
273}
274impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_workflow_runs::ListWorkflowRunsError, R>> for Error
275where
276 R: Send + Sync + std::fmt::Debug + 'static,
277{
278 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_workflow_runs::ListWorkflowRunsError, R>) -> Self {
279 match err {
280 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
281 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
282 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
283 source: err.into(),
284 }),
285 }
286 }
287}
288impl From<crate::operation::list_workflow_runs::ListWorkflowRunsError> for Error {
289 fn from(err: crate::operation::list_workflow_runs::ListWorkflowRunsError) -> Self {
290 match err {
291 crate::operation::list_workflow_runs::ListWorkflowRunsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
292 crate::operation::list_workflow_runs::ListWorkflowRunsError::InternalServerException(inner) => Error::InternalServerException(inner),
293 crate::operation::list_workflow_runs::ListWorkflowRunsError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
294 crate::operation::list_workflow_runs::ListWorkflowRunsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
295 crate::operation::list_workflow_runs::ListWorkflowRunsError::ValidationException(inner) => Error::ValidationException(inner),
296 crate::operation::list_workflow_runs::ListWorkflowRunsError::Unhandled(inner) => Error::Unhandled(inner),
297 }
298 }
299}
300impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_workflows::ListWorkflowsError, R>> for Error
301where
302 R: Send + Sync + std::fmt::Debug + 'static,
303{
304 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_workflows::ListWorkflowsError, R>) -> Self {
305 match err {
306 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
307 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
308 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
309 source: err.into(),
310 }),
311 }
312 }
313}
314impl From<crate::operation::list_workflows::ListWorkflowsError> for Error {
315 fn from(err: crate::operation::list_workflows::ListWorkflowsError) -> Self {
316 match err {
317 crate::operation::list_workflows::ListWorkflowsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
318 crate::operation::list_workflows::ListWorkflowsError::InternalServerException(inner) => Error::InternalServerException(inner),
319 crate::operation::list_workflows::ListWorkflowsError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
320 crate::operation::list_workflows::ListWorkflowsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
321 crate::operation::list_workflows::ListWorkflowsError::ValidationException(inner) => Error::ValidationException(inner),
322 crate::operation::list_workflows::ListWorkflowsError::Unhandled(inner) => Error::Unhandled(inner),
323 }
324 }
325}
326impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_workflow_versions::ListWorkflowVersionsError, 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::list_workflow_versions::ListWorkflowVersionsError, 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::list_workflow_versions::ListWorkflowVersionsError> for Error {
341 fn from(err: crate::operation::list_workflow_versions::ListWorkflowVersionsError) -> Self {
342 match err {
343 crate::operation::list_workflow_versions::ListWorkflowVersionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
344 crate::operation::list_workflow_versions::ListWorkflowVersionsError::InternalServerException(inner) => {
345 Error::InternalServerException(inner)
346 }
347 crate::operation::list_workflow_versions::ListWorkflowVersionsError::OperationTimeoutException(inner) => {
348 Error::OperationTimeoutException(inner)
349 }
350 crate::operation::list_workflow_versions::ListWorkflowVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
351 crate::operation::list_workflow_versions::ListWorkflowVersionsError::ValidationException(inner) => Error::ValidationException(inner),
352 crate::operation::list_workflow_versions::ListWorkflowVersionsError::Unhandled(inner) => Error::Unhandled(inner),
353 }
354 }
355}
356impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_workflow_run::StartWorkflowRunError, 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::start_workflow_run::StartWorkflowRunError, 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::start_workflow_run::StartWorkflowRunError> for Error {
371 fn from(err: crate::operation::start_workflow_run::StartWorkflowRunError) -> Self {
372 match err {
373 crate::operation::start_workflow_run::StartWorkflowRunError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
374 crate::operation::start_workflow_run::StartWorkflowRunError::ConflictException(inner) => Error::ConflictException(inner),
375 crate::operation::start_workflow_run::StartWorkflowRunError::InternalServerException(inner) => Error::InternalServerException(inner),
376 crate::operation::start_workflow_run::StartWorkflowRunError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
377 crate::operation::start_workflow_run::StartWorkflowRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
378 crate::operation::start_workflow_run::StartWorkflowRunError::ServiceQuotaExceededException(inner) => {
379 Error::ServiceQuotaExceededException(inner)
380 }
381 crate::operation::start_workflow_run::StartWorkflowRunError::ThrottlingException(inner) => Error::ThrottlingException(inner),
382 crate::operation::start_workflow_run::StartWorkflowRunError::ValidationException(inner) => Error::ValidationException(inner),
383 crate::operation::start_workflow_run::StartWorkflowRunError::Unhandled(inner) => Error::Unhandled(inner),
384 }
385 }
386}
387impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_workflow_run::StopWorkflowRunError, R>> for Error
388where
389 R: Send + Sync + std::fmt::Debug + 'static,
390{
391 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_workflow_run::StopWorkflowRunError, R>) -> Self {
392 match err {
393 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
394 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
395 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
396 source: err.into(),
397 }),
398 }
399 }
400}
401impl From<crate::operation::stop_workflow_run::StopWorkflowRunError> for Error {
402 fn from(err: crate::operation::stop_workflow_run::StopWorkflowRunError) -> Self {
403 match err {
404 crate::operation::stop_workflow_run::StopWorkflowRunError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
405 crate::operation::stop_workflow_run::StopWorkflowRunError::InternalServerException(inner) => Error::InternalServerException(inner),
406 crate::operation::stop_workflow_run::StopWorkflowRunError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
407 crate::operation::stop_workflow_run::StopWorkflowRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
408 crate::operation::stop_workflow_run::StopWorkflowRunError::ThrottlingException(inner) => Error::ThrottlingException(inner),
409 crate::operation::stop_workflow_run::StopWorkflowRunError::ValidationException(inner) => Error::ValidationException(inner),
410 crate::operation::stop_workflow_run::StopWorkflowRunError::Unhandled(inner) => Error::Unhandled(inner),
411 }
412 }
413}
414impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
415where
416 R: Send + Sync + std::fmt::Debug + 'static,
417{
418 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
419 match err {
420 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
421 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
422 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
423 source: err.into(),
424 }),
425 }
426 }
427}
428impl From<crate::operation::tag_resource::TagResourceError> for Error {
429 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
430 match err {
431 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
432 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
433 crate::operation::tag_resource::TagResourceError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
434 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
435 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
436 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
437 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
438 }
439 }
440}
441impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
442where
443 R: Send + Sync + std::fmt::Debug + 'static,
444{
445 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
446 match err {
447 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
448 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
449 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
450 source: err.into(),
451 }),
452 }
453 }
454}
455impl From<crate::operation::untag_resource::UntagResourceError> for Error {
456 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
457 match err {
458 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
459 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
460 crate::operation::untag_resource::UntagResourceError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
461 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
462 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
463 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
464 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
465 }
466 }
467}
468impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_workflow::UpdateWorkflowError, 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::update_workflow::UpdateWorkflowError, 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::update_workflow::UpdateWorkflowError> for Error {
483 fn from(err: crate::operation::update_workflow::UpdateWorkflowError) -> Self {
484 match err {
485 crate::operation::update_workflow::UpdateWorkflowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
486 crate::operation::update_workflow::UpdateWorkflowError::ConflictException(inner) => Error::ConflictException(inner),
487 crate::operation::update_workflow::UpdateWorkflowError::InternalServerException(inner) => Error::InternalServerException(inner),
488 crate::operation::update_workflow::UpdateWorkflowError::OperationTimeoutException(inner) => Error::OperationTimeoutException(inner),
489 crate::operation::update_workflow::UpdateWorkflowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
490 crate::operation::update_workflow::UpdateWorkflowError::ServiceQuotaExceededException(inner) => {
491 Error::ServiceQuotaExceededException(inner)
492 }
493 crate::operation::update_workflow::UpdateWorkflowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
494 crate::operation::update_workflow::UpdateWorkflowError::ValidationException(inner) => Error::ValidationException(inner),
495 crate::operation::update_workflow::UpdateWorkflowError::Unhandled(inner) => Error::Unhandled(inner),
496 }
497 }
498}
499impl ::std::error::Error for Error {
500 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
501 match self {
502 Error::AccessDeniedException(inner) => inner.source(),
503 Error::ConflictException(inner) => inner.source(),
504 Error::InternalServerException(inner) => inner.source(),
505 Error::OperationTimeoutException(inner) => inner.source(),
506 Error::ResourceNotFoundException(inner) => inner.source(),
507 Error::ServiceQuotaExceededException(inner) => inner.source(),
508 Error::ThrottlingException(inner) => inner.source(),
509 Error::ValidationException(inner) => inner.source(),
510 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
511 }
512 }
513}
514impl ::aws_types::request_id::RequestId for Error {
515 fn request_id(&self) -> Option<&str> {
516 match self {
517 Self::AccessDeniedException(e) => e.request_id(),
518 Self::ConflictException(e) => e.request_id(),
519 Self::InternalServerException(e) => e.request_id(),
520 Self::OperationTimeoutException(e) => e.request_id(),
521 Self::ResourceNotFoundException(e) => e.request_id(),
522 Self::ServiceQuotaExceededException(e) => e.request_id(),
523 Self::ThrottlingException(e) => e.request_id(),
524 Self::ValidationException(e) => e.request_id(),
525 Self::Unhandled(e) => e.meta.request_id(),
526 }
527 }
528}