1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AttachmentIdNotFound(crate::types::error::AttachmentIdNotFound),
8 AttachmentLimitExceeded(crate::types::error::AttachmentLimitExceeded),
10 AttachmentSetExpired(crate::types::error::AttachmentSetExpired),
12 AttachmentSetIdNotFound(crate::types::error::AttachmentSetIdNotFound),
14 AttachmentSetSizeLimitExceeded(crate::types::error::AttachmentSetSizeLimitExceeded),
16 CaseCreationLimitExceeded(crate::types::error::CaseCreationLimitExceeded),
18 CaseIdNotFound(crate::types::error::CaseIdNotFound),
20 DescribeAttachmentLimitExceeded(crate::types::error::DescribeAttachmentLimitExceeded),
22 DryRunOperationException(crate::types::error::DryRunOperationException),
24 InternalServerError(crate::types::error::InternalServerError),
26 ThrottlingException(crate::types::error::ThrottlingException),
28 UploadIdNotFound(crate::types::error::UploadIdNotFound),
30 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
32 variable wildcard pattern and check `.code()`:
33 \
34 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
35 \
36 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
37 Unhandled(crate::error::sealed_unhandled::Unhandled),
38}
39impl ::std::fmt::Display for Error {
40 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
41 match self {
42 Error::AttachmentIdNotFound(inner) => inner.fmt(f),
43 Error::AttachmentLimitExceeded(inner) => inner.fmt(f),
44 Error::AttachmentSetExpired(inner) => inner.fmt(f),
45 Error::AttachmentSetIdNotFound(inner) => inner.fmt(f),
46 Error::AttachmentSetSizeLimitExceeded(inner) => inner.fmt(f),
47 Error::CaseCreationLimitExceeded(inner) => inner.fmt(f),
48 Error::CaseIdNotFound(inner) => inner.fmt(f),
49 Error::DescribeAttachmentLimitExceeded(inner) => inner.fmt(f),
50 Error::DryRunOperationException(inner) => inner.fmt(f),
51 Error::InternalServerError(inner) => inner.fmt(f),
52 Error::ThrottlingException(inner) => inner.fmt(f),
53 Error::UploadIdNotFound(inner) => inner.fmt(f),
54 Error::Unhandled(_) => {
55 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
56 write!(f, "unhandled error ({code})")
57 } else {
58 f.write_str("unhandled error")
59 }
60 }
61 }
62 }
63}
64impl From<::aws_smithy_types::error::operation::BuildError> for Error {
65 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
66 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
67 source: value.into(),
68 meta: ::std::default::Default::default(),
69 })
70 }
71}
72impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
73 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
74 match self {
75 Self::AttachmentIdNotFound(inner) => inner.meta(),
76 Self::AttachmentLimitExceeded(inner) => inner.meta(),
77 Self::AttachmentSetExpired(inner) => inner.meta(),
78 Self::AttachmentSetIdNotFound(inner) => inner.meta(),
79 Self::AttachmentSetSizeLimitExceeded(inner) => inner.meta(),
80 Self::CaseCreationLimitExceeded(inner) => inner.meta(),
81 Self::CaseIdNotFound(inner) => inner.meta(),
82 Self::DescribeAttachmentLimitExceeded(inner) => inner.meta(),
83 Self::DryRunOperationException(inner) => inner.meta(),
84 Self::InternalServerError(inner) => inner.meta(),
85 Self::ThrottlingException(inner) => inner.meta(),
86 Self::UploadIdNotFound(inner) => inner.meta(),
87 Self::Unhandled(inner) => &inner.meta,
88 }
89 }
90}
91impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_attachments_to_set::AddAttachmentsToSetError, R>> for Error
92where
93 R: Send + Sync + std::fmt::Debug + 'static,
94{
95 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_attachments_to_set::AddAttachmentsToSetError, R>) -> Self {
96 match err {
97 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
98 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
99 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
100 source: err.into(),
101 }),
102 }
103 }
104}
105impl From<crate::operation::add_attachments_to_set::AddAttachmentsToSetError> for Error {
106 fn from(err: crate::operation::add_attachments_to_set::AddAttachmentsToSetError) -> Self {
107 match err {
108 crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentLimitExceeded(inner) => {
109 Error::AttachmentLimitExceeded(inner)
110 }
111 crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentSetExpired(inner) => Error::AttachmentSetExpired(inner),
112 crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentSetIdNotFound(inner) => {
113 Error::AttachmentSetIdNotFound(inner)
114 }
115 crate::operation::add_attachments_to_set::AddAttachmentsToSetError::AttachmentSetSizeLimitExceeded(inner) => {
116 Error::AttachmentSetSizeLimitExceeded(inner)
117 }
118 crate::operation::add_attachments_to_set::AddAttachmentsToSetError::DryRunOperationException(inner) => {
119 Error::DryRunOperationException(inner)
120 }
121 crate::operation::add_attachments_to_set::AddAttachmentsToSetError::InternalServerError(inner) => Error::InternalServerError(inner),
122 crate::operation::add_attachments_to_set::AddAttachmentsToSetError::Unhandled(inner) => Error::Unhandled(inner),
123 }
124 }
125}
126impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_communication_to_case::AddCommunicationToCaseError, R>>
127 for Error
128where
129 R: Send + Sync + std::fmt::Debug + 'static,
130{
131 fn from(
132 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_communication_to_case::AddCommunicationToCaseError, R>,
133 ) -> Self {
134 match err {
135 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
136 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
137 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
138 source: err.into(),
139 }),
140 }
141 }
142}
143impl From<crate::operation::add_communication_to_case::AddCommunicationToCaseError> for Error {
144 fn from(err: crate::operation::add_communication_to_case::AddCommunicationToCaseError) -> Self {
145 match err {
146 crate::operation::add_communication_to_case::AddCommunicationToCaseError::AttachmentSetExpired(inner) => {
147 Error::AttachmentSetExpired(inner)
148 }
149 crate::operation::add_communication_to_case::AddCommunicationToCaseError::AttachmentSetIdNotFound(inner) => {
150 Error::AttachmentSetIdNotFound(inner)
151 }
152 crate::operation::add_communication_to_case::AddCommunicationToCaseError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
153 crate::operation::add_communication_to_case::AddCommunicationToCaseError::DryRunOperationException(inner) => {
154 Error::DryRunOperationException(inner)
155 }
156 crate::operation::add_communication_to_case::AddCommunicationToCaseError::InternalServerError(inner) => Error::InternalServerError(inner),
157 crate::operation::add_communication_to_case::AddCommunicationToCaseError::Unhandled(inner) => Error::Unhandled(inner),
158 }
159 }
160}
161impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::complete_attachment_upload::CompleteAttachmentUploadError, R>>
162 for Error
163where
164 R: Send + Sync + std::fmt::Debug + 'static,
165{
166 fn from(
167 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::complete_attachment_upload::CompleteAttachmentUploadError, R>,
168 ) -> Self {
169 match err {
170 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
171 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
172 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
173 source: err.into(),
174 }),
175 }
176 }
177}
178impl From<crate::operation::complete_attachment_upload::CompleteAttachmentUploadError> for Error {
179 fn from(err: crate::operation::complete_attachment_upload::CompleteAttachmentUploadError) -> Self {
180 match err {
181 crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::DryRunOperationException(inner) => {
182 Error::DryRunOperationException(inner)
183 }
184 crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::InternalServerError(inner) => {
185 Error::InternalServerError(inner)
186 }
187 crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::UploadIdNotFound(inner) => Error::UploadIdNotFound(inner),
188 crate::operation::complete_attachment_upload::CompleteAttachmentUploadError::Unhandled(inner) => Error::Unhandled(inner),
189 }
190 }
191}
192impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_case::CreateCaseError, R>> for Error
193where
194 R: Send + Sync + std::fmt::Debug + 'static,
195{
196 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_case::CreateCaseError, R>) -> Self {
197 match err {
198 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
199 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
200 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
201 source: err.into(),
202 }),
203 }
204 }
205}
206impl From<crate::operation::create_case::CreateCaseError> for Error {
207 fn from(err: crate::operation::create_case::CreateCaseError) -> Self {
208 match err {
209 crate::operation::create_case::CreateCaseError::AttachmentSetExpired(inner) => Error::AttachmentSetExpired(inner),
210 crate::operation::create_case::CreateCaseError::AttachmentSetIdNotFound(inner) => Error::AttachmentSetIdNotFound(inner),
211 crate::operation::create_case::CreateCaseError::CaseCreationLimitExceeded(inner) => Error::CaseCreationLimitExceeded(inner),
212 crate::operation::create_case::CreateCaseError::DryRunOperationException(inner) => Error::DryRunOperationException(inner),
213 crate::operation::create_case::CreateCaseError::InternalServerError(inner) => Error::InternalServerError(inner),
214 crate::operation::create_case::CreateCaseError::Unhandled(inner) => Error::Unhandled(inner),
215 }
216 }
217}
218impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attachment::DescribeAttachmentError, R>> for Error
219where
220 R: Send + Sync + std::fmt::Debug + 'static,
221{
222 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_attachment::DescribeAttachmentError, R>) -> Self {
223 match err {
224 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
225 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
226 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
227 source: err.into(),
228 }),
229 }
230 }
231}
232impl From<crate::operation::describe_attachment::DescribeAttachmentError> for Error {
233 fn from(err: crate::operation::describe_attachment::DescribeAttachmentError) -> Self {
234 match err {
235 crate::operation::describe_attachment::DescribeAttachmentError::AttachmentIdNotFound(inner) => Error::AttachmentIdNotFound(inner),
236 crate::operation::describe_attachment::DescribeAttachmentError::DescribeAttachmentLimitExceeded(inner) => {
237 Error::DescribeAttachmentLimitExceeded(inner)
238 }
239 crate::operation::describe_attachment::DescribeAttachmentError::DryRunOperationException(inner) => Error::DryRunOperationException(inner),
240 crate::operation::describe_attachment::DescribeAttachmentError::InternalServerError(inner) => Error::InternalServerError(inner),
241 crate::operation::describe_attachment::DescribeAttachmentError::Unhandled(inner) => Error::Unhandled(inner),
242 }
243 }
244}
245impl<R>
246 From<
247 ::aws_smithy_runtime_api::client::result::SdkError<
248 crate::operation::describe_attachment_upload_status::DescribeAttachmentUploadStatusError,
249 R,
250 >,
251 > for Error
252where
253 R: Send + Sync + std::fmt::Debug + 'static,
254{
255 fn from(
256 err: ::aws_smithy_runtime_api::client::result::SdkError<
257 crate::operation::describe_attachment_upload_status::DescribeAttachmentUploadStatusError,
258 R,
259 >,
260 ) -> 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::describe_attachment_upload_status::DescribeAttachmentUploadStatusError> for Error {
271 fn from(err: crate::operation::describe_attachment_upload_status::DescribeAttachmentUploadStatusError) -> Self {
272 match err {
273 crate::operation::describe_attachment_upload_status::DescribeAttachmentUploadStatusError::DryRunOperationException(inner) => {
274 Error::DryRunOperationException(inner)
275 }
276 crate::operation::describe_attachment_upload_status::DescribeAttachmentUploadStatusError::InternalServerError(inner) => {
277 Error::InternalServerError(inner)
278 }
279 crate::operation::describe_attachment_upload_status::DescribeAttachmentUploadStatusError::UploadIdNotFound(inner) => {
280 Error::UploadIdNotFound(inner)
281 }
282 crate::operation::describe_attachment_upload_status::DescribeAttachmentUploadStatusError::Unhandled(inner) => Error::Unhandled(inner),
283 }
284 }
285}
286impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_cases::DescribeCasesError, R>> for Error
287where
288 R: Send + Sync + std::fmt::Debug + 'static,
289{
290 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_cases::DescribeCasesError, R>) -> Self {
291 match err {
292 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
293 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
294 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
295 source: err.into(),
296 }),
297 }
298 }
299}
300impl From<crate::operation::describe_cases::DescribeCasesError> for Error {
301 fn from(err: crate::operation::describe_cases::DescribeCasesError) -> Self {
302 match err {
303 crate::operation::describe_cases::DescribeCasesError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
304 crate::operation::describe_cases::DescribeCasesError::DryRunOperationException(inner) => Error::DryRunOperationException(inner),
305 crate::operation::describe_cases::DescribeCasesError::InternalServerError(inner) => Error::InternalServerError(inner),
306 crate::operation::describe_cases::DescribeCasesError::Unhandled(inner) => Error::Unhandled(inner),
307 }
308 }
309}
310impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_communications::DescribeCommunicationsError, R>> for Error
311where
312 R: Send + Sync + std::fmt::Debug + 'static,
313{
314 fn from(
315 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_communications::DescribeCommunicationsError, R>,
316 ) -> Self {
317 match err {
318 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
319 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
320 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
321 source: err.into(),
322 }),
323 }
324 }
325}
326impl From<crate::operation::describe_communications::DescribeCommunicationsError> for Error {
327 fn from(err: crate::operation::describe_communications::DescribeCommunicationsError) -> Self {
328 match err {
329 crate::operation::describe_communications::DescribeCommunicationsError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
330 crate::operation::describe_communications::DescribeCommunicationsError::DryRunOperationException(inner) => {
331 Error::DryRunOperationException(inner)
332 }
333 crate::operation::describe_communications::DescribeCommunicationsError::InternalServerError(inner) => Error::InternalServerError(inner),
334 crate::operation::describe_communications::DescribeCommunicationsError::Unhandled(inner) => Error::Unhandled(inner),
335 }
336 }
337}
338impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError, R>>
339 for Error
340where
341 R: Send + Sync + std::fmt::Debug + 'static,
342{
343 fn from(
344 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError, R>,
345 ) -> Self {
346 match err {
347 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
348 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
349 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
350 source: err.into(),
351 }),
352 }
353 }
354}
355impl From<crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError> for Error {
356 fn from(err: crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError) -> Self {
357 match err {
358 crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError::DryRunOperationException(inner) => {
359 Error::DryRunOperationException(inner)
360 }
361 crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError::InternalServerError(inner) => {
362 Error::InternalServerError(inner)
363 }
364 crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError::ThrottlingException(inner) => {
365 Error::ThrottlingException(inner)
366 }
367 crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError::Unhandled(inner) => Error::Unhandled(inner),
368 }
369 }
370}
371impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_services::DescribeServicesError, R>> for Error
372where
373 R: Send + Sync + std::fmt::Debug + 'static,
374{
375 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_services::DescribeServicesError, R>) -> Self {
376 match err {
377 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
378 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
379 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
380 source: err.into(),
381 }),
382 }
383 }
384}
385impl From<crate::operation::describe_services::DescribeServicesError> for Error {
386 fn from(err: crate::operation::describe_services::DescribeServicesError) -> Self {
387 match err {
388 crate::operation::describe_services::DescribeServicesError::DryRunOperationException(inner) => Error::DryRunOperationException(inner),
389 crate::operation::describe_services::DescribeServicesError::InternalServerError(inner) => Error::InternalServerError(inner),
390 crate::operation::describe_services::DescribeServicesError::Unhandled(inner) => Error::Unhandled(inner),
391 }
392 }
393}
394impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_severity_levels::DescribeSeverityLevelsError, R>> for Error
395where
396 R: Send + Sync + std::fmt::Debug + 'static,
397{
398 fn from(
399 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_severity_levels::DescribeSeverityLevelsError, R>,
400 ) -> Self {
401 match err {
402 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
403 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
404 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
405 source: err.into(),
406 }),
407 }
408 }
409}
410impl From<crate::operation::describe_severity_levels::DescribeSeverityLevelsError> for Error {
411 fn from(err: crate::operation::describe_severity_levels::DescribeSeverityLevelsError) -> Self {
412 match err {
413 crate::operation::describe_severity_levels::DescribeSeverityLevelsError::DryRunOperationException(inner) => {
414 Error::DryRunOperationException(inner)
415 }
416 crate::operation::describe_severity_levels::DescribeSeverityLevelsError::InternalServerError(inner) => Error::InternalServerError(inner),
417 crate::operation::describe_severity_levels::DescribeSeverityLevelsError::Unhandled(inner) => Error::Unhandled(inner),
418 }
419 }
420}
421impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_supported_languages::DescribeSupportedLanguagesError, R>>
422 for Error
423where
424 R: Send + Sync + std::fmt::Debug + 'static,
425{
426 fn from(
427 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_supported_languages::DescribeSupportedLanguagesError, R>,
428 ) -> Self {
429 match err {
430 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
431 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
432 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
433 source: err.into(),
434 }),
435 }
436 }
437}
438impl From<crate::operation::describe_supported_languages::DescribeSupportedLanguagesError> for Error {
439 fn from(err: crate::operation::describe_supported_languages::DescribeSupportedLanguagesError) -> Self {
440 match err {
441 crate::operation::describe_supported_languages::DescribeSupportedLanguagesError::DryRunOperationException(inner) => {
442 Error::DryRunOperationException(inner)
443 }
444 crate::operation::describe_supported_languages::DescribeSupportedLanguagesError::InternalServerError(inner) => {
445 Error::InternalServerError(inner)
446 }
447 crate::operation::describe_supported_languages::DescribeSupportedLanguagesError::ThrottlingException(inner) => {
448 Error::ThrottlingException(inner)
449 }
450 crate::operation::describe_supported_languages::DescribeSupportedLanguagesError::Unhandled(inner) => Error::Unhandled(inner),
451 }
452 }
453}
454impl<R>
455 From<
456 ::aws_smithy_runtime_api::client::result::SdkError<
457 crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError,
458 R,
459 >,
460 > for Error
461where
462 R: Send + Sync + std::fmt::Debug + 'static,
463{
464 fn from(
465 err: ::aws_smithy_runtime_api::client::result::SdkError<
466 crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError,
467 R,
468 >,
469 ) -> Self {
470 match err {
471 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
472 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
473 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
474 source: err.into(),
475 }),
476 }
477 }
478}
479impl From<crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError> for Error {
480 fn from(err: crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError) -> Self {
481 match err {
482 crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError::InternalServerError(inner) => Error::InternalServerError(inner),
483 crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
484 crate::operation::describe_trusted_advisor_check_refresh_statuses::DescribeTrustedAdvisorCheckRefreshStatusesError::Unhandled(inner) => Error::Unhandled(inner),
485 }
486 }
487}
488impl<R>
489 From<
490 ::aws_smithy_runtime_api::client::result::SdkError<
491 crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError,
492 R,
493 >,
494 > for Error
495where
496 R: Send + Sync + std::fmt::Debug + 'static,
497{
498 fn from(
499 err: ::aws_smithy_runtime_api::client::result::SdkError<
500 crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError,
501 R,
502 >,
503 ) -> Self {
504 match err {
505 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
506 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
507 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
508 source: err.into(),
509 }),
510 }
511 }
512}
513impl From<crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError> for Error {
514 fn from(err: crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError) -> Self {
515 match err {
516 crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError::InternalServerError(inner) => {
517 Error::InternalServerError(inner)
518 }
519 crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError::ThrottlingException(inner) => {
520 Error::ThrottlingException(inner)
521 }
522 crate::operation::describe_trusted_advisor_check_result::DescribeTrustedAdvisorCheckResultError::Unhandled(inner) => {
523 Error::Unhandled(inner)
524 }
525 }
526 }
527}
528impl<R>
529 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError, R>>
530 for Error
531where
532 R: Send + Sync + std::fmt::Debug + 'static,
533{
534 fn from(
535 err: ::aws_smithy_runtime_api::client::result::SdkError<
536 crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError,
537 R,
538 >,
539 ) -> Self {
540 match err {
541 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
542 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
543 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
544 source: err.into(),
545 }),
546 }
547 }
548}
549impl From<crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError> for Error {
550 fn from(err: crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError) -> Self {
551 match err {
552 crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError::InternalServerError(inner) => {
553 Error::InternalServerError(inner)
554 }
555 crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError::ThrottlingException(inner) => {
556 Error::ThrottlingException(inner)
557 }
558 crate::operation::describe_trusted_advisor_checks::DescribeTrustedAdvisorChecksError::Unhandled(inner) => Error::Unhandled(inner),
559 }
560 }
561}
562impl<R>
563 From<
564 ::aws_smithy_runtime_api::client::result::SdkError<
565 crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
566 R,
567 >,
568 > for Error
569where
570 R: Send + Sync + std::fmt::Debug + 'static,
571{
572 fn from(
573 err: ::aws_smithy_runtime_api::client::result::SdkError<
574 crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError,
575 R,
576 >,
577 ) -> Self {
578 match err {
579 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
580 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
581 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
582 source: err.into(),
583 }),
584 }
585 }
586}
587impl From<crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError> for Error {
588 fn from(err: crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError) -> Self {
589 match err {
590 crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError::InternalServerError(inner) => {
591 Error::InternalServerError(inner)
592 }
593 crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError::ThrottlingException(inner) => {
594 Error::ThrottlingException(inner)
595 }
596 crate::operation::describe_trusted_advisor_check_summaries::DescribeTrustedAdvisorCheckSummariesError::Unhandled(inner) => {
597 Error::Unhandled(inner)
598 }
599 }
600 }
601}
602impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError, R>>
603 for Error
604where
605 R: Send + Sync + std::fmt::Debug + 'static,
606{
607 fn from(
608 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError, R>,
609 ) -> Self {
610 match err {
611 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
612 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
613 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
614 source: err.into(),
615 }),
616 }
617 }
618}
619impl From<crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError> for Error {
620 fn from(err: crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError) -> Self {
621 match err {
622 crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError::AttachmentIdNotFound(inner) => {
623 Error::AttachmentIdNotFound(inner)
624 }
625 crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError::DryRunOperationException(inner) => {
626 Error::DryRunOperationException(inner)
627 }
628 crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError::InternalServerError(inner) => {
629 Error::InternalServerError(inner)
630 }
631 crate::operation::get_attachment_download_link::GetAttachmentDownloadLinkError::Unhandled(inner) => Error::Unhandled(inner),
632 }
633 }
634}
635impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError, R>>
636 for Error
637where
638 R: Send + Sync + std::fmt::Debug + 'static,
639{
640 fn from(
641 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError, R>,
642 ) -> Self {
643 match err {
644 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
645 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
646 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
647 source: err.into(),
648 }),
649 }
650 }
651}
652impl From<crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError> for Error {
653 fn from(err: crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError) -> Self {
654 match err {
655 crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError::DryRunOperationException(inner) => {
656 Error::DryRunOperationException(inner)
657 }
658 crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError::InternalServerError(inner) => {
659 Error::InternalServerError(inner)
660 }
661 crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError::UploadIdNotFound(inner) => Error::UploadIdNotFound(inner),
662 crate::operation::get_attachment_upload_links::GetAttachmentUploadLinksError::Unhandled(inner) => Error::Unhandled(inner),
663 }
664 }
665}
666impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError, R>>
667 for Error
668where
669 R: Send + Sync + std::fmt::Debug + 'static,
670{
671 fn from(
672 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError, R>,
673 ) -> Self {
674 match err {
675 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
676 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
677 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
678 source: err.into(),
679 }),
680 }
681 }
682}
683impl From<crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError> for Error {
684 fn from(err: crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError) -> Self {
685 match err {
686 crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError::InternalServerError(inner) => {
687 Error::InternalServerError(inner)
688 }
689 crate::operation::refresh_trusted_advisor_check::RefreshTrustedAdvisorCheckError::Unhandled(inner) => Error::Unhandled(inner),
690 }
691 }
692}
693impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resolve_case::ResolveCaseError, R>> for Error
694where
695 R: Send + Sync + std::fmt::Debug + 'static,
696{
697 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resolve_case::ResolveCaseError, R>) -> Self {
698 match err {
699 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
700 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
701 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
702 source: err.into(),
703 }),
704 }
705 }
706}
707impl From<crate::operation::resolve_case::ResolveCaseError> for Error {
708 fn from(err: crate::operation::resolve_case::ResolveCaseError) -> Self {
709 match err {
710 crate::operation::resolve_case::ResolveCaseError::CaseIdNotFound(inner) => Error::CaseIdNotFound(inner),
711 crate::operation::resolve_case::ResolveCaseError::DryRunOperationException(inner) => Error::DryRunOperationException(inner),
712 crate::operation::resolve_case::ResolveCaseError::InternalServerError(inner) => Error::InternalServerError(inner),
713 crate::operation::resolve_case::ResolveCaseError::Unhandled(inner) => Error::Unhandled(inner),
714 }
715 }
716}
717impl ::std::error::Error for Error {
718 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
719 match self {
720 Error::AttachmentIdNotFound(inner) => inner.source(),
721 Error::AttachmentLimitExceeded(inner) => inner.source(),
722 Error::AttachmentSetExpired(inner) => inner.source(),
723 Error::AttachmentSetIdNotFound(inner) => inner.source(),
724 Error::AttachmentSetSizeLimitExceeded(inner) => inner.source(),
725 Error::CaseCreationLimitExceeded(inner) => inner.source(),
726 Error::CaseIdNotFound(inner) => inner.source(),
727 Error::DescribeAttachmentLimitExceeded(inner) => inner.source(),
728 Error::DryRunOperationException(inner) => inner.source(),
729 Error::InternalServerError(inner) => inner.source(),
730 Error::ThrottlingException(inner) => inner.source(),
731 Error::UploadIdNotFound(inner) => inner.source(),
732 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
733 }
734 }
735}
736impl ::aws_types::request_id::RequestId for Error {
737 fn request_id(&self) -> Option<&str> {
738 match self {
739 Self::AttachmentIdNotFound(e) => e.request_id(),
740 Self::AttachmentLimitExceeded(e) => e.request_id(),
741 Self::AttachmentSetExpired(e) => e.request_id(),
742 Self::AttachmentSetIdNotFound(e) => e.request_id(),
743 Self::AttachmentSetSizeLimitExceeded(e) => e.request_id(),
744 Self::CaseCreationLimitExceeded(e) => e.request_id(),
745 Self::CaseIdNotFound(e) => e.request_id(),
746 Self::DescribeAttachmentLimitExceeded(e) => e.request_id(),
747 Self::DryRunOperationException(e) => e.request_id(),
748 Self::InternalServerError(e) => e.request_id(),
749 Self::ThrottlingException(e) => e.request_id(),
750 Self::UploadIdNotFound(e) => e.request_id(),
751 Self::Unhandled(e) => e.meta.request_id(),
752 }
753 }
754}