1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 InternalServiceError(crate::types::error::InternalServiceError),
8 InvalidArgumentException(crate::types::error::InvalidArgumentException),
10 NotAuthorizedException(crate::types::error::NotAuthorizedException),
12 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
14 variable wildcard pattern and check `.code()`:
15 \
16 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
17 \
18 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
19 Unhandled(crate::error::sealed_unhandled::Unhandled),
20}
21impl ::std::fmt::Display for Error {
22 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23 match self {
24 Error::InternalServiceError(inner) => inner.fmt(f),
25 Error::InvalidArgumentException(inner) => inner.fmt(f),
26 Error::NotAuthorizedException(inner) => inner.fmt(f),
27 Error::Unhandled(_) => {
28 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
29 write!(f, "unhandled error ({code})")
30 } else {
31 f.write_str("unhandled error")
32 }
33 }
34 }
35 }
36}
37impl From<::aws_smithy_types::error::operation::BuildError> for Error {
38 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
39 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
40 source: value.into(),
41 meta: ::std::default::Default::default(),
42 })
43 }
44}
45impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
46 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
47 match self {
48 Self::InternalServiceError(inner) => inner.meta(),
49 Self::InvalidArgumentException(inner) => inner.meta(),
50 Self::NotAuthorizedException(inner) => inner.meta(),
51 Self::Unhandled(inner) => &inner.meta,
52 }
53 }
54}
55impl<R>
56 From<
57 ::aws_smithy_runtime_api::client::result::SdkError<
58 crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError,
59 R,
60 >,
61 > for Error
62where
63 R: Send + Sync + std::fmt::Debug + 'static,
64{
65 fn from(
66 err: ::aws_smithy_runtime_api::client::result::SdkError<
67 crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError,
68 R,
69 >,
70 ) -> Self {
71 match err {
72 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
73 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
74 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
75 source: err.into(),
76 }),
77 }
78 }
79}
80impl From<crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError> for Error {
81 fn from(err: crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError) -> Self {
82 match err {
83 crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::InternalServiceError(inner) => {
84 Error::InternalServiceError(inner)
85 }
86 crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::InvalidArgumentException(inner) => {
87 Error::InvalidArgumentException(inner)
88 }
89 crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::NotAuthorizedException(inner) => {
90 Error::NotAuthorizedException(inner)
91 }
92 crate::operation::create_performance_analysis_report::CreatePerformanceAnalysisReportError::Unhandled(inner) => Error::Unhandled(inner),
93 }
94 }
95}
96impl<R>
97 From<
98 ::aws_smithy_runtime_api::client::result::SdkError<
99 crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError,
100 R,
101 >,
102 > for Error
103where
104 R: Send + Sync + std::fmt::Debug + 'static,
105{
106 fn from(
107 err: ::aws_smithy_runtime_api::client::result::SdkError<
108 crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError,
109 R,
110 >,
111 ) -> Self {
112 match err {
113 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
114 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
115 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
116 source: err.into(),
117 }),
118 }
119 }
120}
121impl From<crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError> for Error {
122 fn from(err: crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError) -> Self {
123 match err {
124 crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::InternalServiceError(inner) => {
125 Error::InternalServiceError(inner)
126 }
127 crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::InvalidArgumentException(inner) => {
128 Error::InvalidArgumentException(inner)
129 }
130 crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::NotAuthorizedException(inner) => {
131 Error::NotAuthorizedException(inner)
132 }
133 crate::operation::delete_performance_analysis_report::DeletePerformanceAnalysisReportError::Unhandled(inner) => Error::Unhandled(inner),
134 }
135 }
136}
137impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dimension_keys::DescribeDimensionKeysError, R>> for Error
138where
139 R: Send + Sync + std::fmt::Debug + 'static,
140{
141 fn from(
142 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_dimension_keys::DescribeDimensionKeysError, R>,
143 ) -> Self {
144 match err {
145 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
146 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
147 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
148 source: err.into(),
149 }),
150 }
151 }
152}
153impl From<crate::operation::describe_dimension_keys::DescribeDimensionKeysError> for Error {
154 fn from(err: crate::operation::describe_dimension_keys::DescribeDimensionKeysError) -> Self {
155 match err {
156 crate::operation::describe_dimension_keys::DescribeDimensionKeysError::InternalServiceError(inner) => Error::InternalServiceError(inner),
157 crate::operation::describe_dimension_keys::DescribeDimensionKeysError::InvalidArgumentException(inner) => {
158 Error::InvalidArgumentException(inner)
159 }
160 crate::operation::describe_dimension_keys::DescribeDimensionKeysError::NotAuthorizedException(inner) => {
161 Error::NotAuthorizedException(inner)
162 }
163 crate::operation::describe_dimension_keys::DescribeDimensionKeysError::Unhandled(inner) => Error::Unhandled(inner),
164 }
165 }
166}
167impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError, R>>
168 for Error
169where
170 R: Send + Sync + std::fmt::Debug + 'static,
171{
172 fn from(
173 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError, R>,
174 ) -> Self {
175 match err {
176 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
177 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
178 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
179 source: err.into(),
180 }),
181 }
182 }
183}
184impl From<crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError> for Error {
185 fn from(err: crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError) -> Self {
186 match err {
187 crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::InternalServiceError(inner) => {
188 Error::InternalServiceError(inner)
189 }
190 crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::InvalidArgumentException(inner) => {
191 Error::InvalidArgumentException(inner)
192 }
193 crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::NotAuthorizedException(inner) => {
194 Error::NotAuthorizedException(inner)
195 }
196 crate::operation::get_dimension_key_details::GetDimensionKeyDetailsError::Unhandled(inner) => Error::Unhandled(inner),
197 }
198 }
199}
200impl<R>
201 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError, R>>
202 for Error
203where
204 R: Send + Sync + std::fmt::Debug + 'static,
205{
206 fn from(
207 err: ::aws_smithy_runtime_api::client::result::SdkError<
208 crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError,
209 R,
210 >,
211 ) -> Self {
212 match err {
213 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
214 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
215 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
216 source: err.into(),
217 }),
218 }
219 }
220}
221impl From<crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError> for Error {
222 fn from(err: crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError) -> Self {
223 match err {
224 crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::InternalServiceError(inner) => {
225 Error::InternalServiceError(inner)
226 }
227 crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::InvalidArgumentException(inner) => {
228 Error::InvalidArgumentException(inner)
229 }
230 crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::NotAuthorizedException(inner) => {
231 Error::NotAuthorizedException(inner)
232 }
233 crate::operation::get_performance_analysis_report::GetPerformanceAnalysisReportError::Unhandled(inner) => Error::Unhandled(inner),
234 }
235 }
236}
237impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metadata::GetResourceMetadataError, R>> for Error
238where
239 R: Send + Sync + std::fmt::Debug + 'static,
240{
241 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metadata::GetResourceMetadataError, R>) -> Self {
242 match err {
243 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
244 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
245 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
246 source: err.into(),
247 }),
248 }
249 }
250}
251impl From<crate::operation::get_resource_metadata::GetResourceMetadataError> for Error {
252 fn from(err: crate::operation::get_resource_metadata::GetResourceMetadataError) -> Self {
253 match err {
254 crate::operation::get_resource_metadata::GetResourceMetadataError::InternalServiceError(inner) => Error::InternalServiceError(inner),
255 crate::operation::get_resource_metadata::GetResourceMetadataError::InvalidArgumentException(inner) => {
256 Error::InvalidArgumentException(inner)
257 }
258 crate::operation::get_resource_metadata::GetResourceMetadataError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
259 crate::operation::get_resource_metadata::GetResourceMetadataError::Unhandled(inner) => Error::Unhandled(inner),
260 }
261 }
262}
263impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metrics::GetResourceMetricsError, R>> for Error
264where
265 R: Send + Sync + std::fmt::Debug + 'static,
266{
267 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_metrics::GetResourceMetricsError, R>) -> Self {
268 match err {
269 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
270 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
271 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
272 source: err.into(),
273 }),
274 }
275 }
276}
277impl From<crate::operation::get_resource_metrics::GetResourceMetricsError> for Error {
278 fn from(err: crate::operation::get_resource_metrics::GetResourceMetricsError) -> Self {
279 match err {
280 crate::operation::get_resource_metrics::GetResourceMetricsError::InternalServiceError(inner) => Error::InternalServiceError(inner),
281 crate::operation::get_resource_metrics::GetResourceMetricsError::InvalidArgumentException(inner) => {
282 Error::InvalidArgumentException(inner)
283 }
284 crate::operation::get_resource_metrics::GetResourceMetricsError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
285 crate::operation::get_resource_metrics::GetResourceMetricsError::Unhandled(inner) => Error::Unhandled(inner),
286 }
287 }
288}
289impl<R>
290 From<
291 ::aws_smithy_runtime_api::client::result::SdkError<
292 crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
293 R,
294 >,
295 > for Error
296where
297 R: Send + Sync + std::fmt::Debug + 'static,
298{
299 fn from(
300 err: ::aws_smithy_runtime_api::client::result::SdkError<
301 crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError,
302 R,
303 >,
304 ) -> 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_available_resource_dimensions::ListAvailableResourceDimensionsError> for Error {
315 fn from(err: crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError) -> Self {
316 match err {
317 crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::InternalServiceError(inner) => {
318 Error::InternalServiceError(inner)
319 }
320 crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::InvalidArgumentException(inner) => {
321 Error::InvalidArgumentException(inner)
322 }
323 crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::NotAuthorizedException(inner) => {
324 Error::NotAuthorizedException(inner)
325 }
326 crate::operation::list_available_resource_dimensions::ListAvailableResourceDimensionsError::Unhandled(inner) => Error::Unhandled(inner),
327 }
328 }
329}
330impl<R>
331 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError, R>>
332 for Error
333where
334 R: Send + Sync + std::fmt::Debug + 'static,
335{
336 fn from(
337 err: ::aws_smithy_runtime_api::client::result::SdkError<
338 crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError,
339 R,
340 >,
341 ) -> Self {
342 match err {
343 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
344 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
345 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
346 source: err.into(),
347 }),
348 }
349 }
350}
351impl From<crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError> for Error {
352 fn from(err: crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError) -> Self {
353 match err {
354 crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::InternalServiceError(inner) => {
355 Error::InternalServiceError(inner)
356 }
357 crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::InvalidArgumentException(inner) => {
358 Error::InvalidArgumentException(inner)
359 }
360 crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::NotAuthorizedException(inner) => {
361 Error::NotAuthorizedException(inner)
362 }
363 crate::operation::list_available_resource_metrics::ListAvailableResourceMetricsError::Unhandled(inner) => Error::Unhandled(inner),
364 }
365 }
366}
367impl<R>
368 From<
369 ::aws_smithy_runtime_api::client::result::SdkError<
370 crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError,
371 R,
372 >,
373 > for Error
374where
375 R: Send + Sync + std::fmt::Debug + 'static,
376{
377 fn from(
378 err: ::aws_smithy_runtime_api::client::result::SdkError<
379 crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError,
380 R,
381 >,
382 ) -> Self {
383 match err {
384 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
385 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
386 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
387 source: err.into(),
388 }),
389 }
390 }
391}
392impl From<crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError> for Error {
393 fn from(err: crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError) -> Self {
394 match err {
395 crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::InternalServiceError(inner) => {
396 Error::InternalServiceError(inner)
397 }
398 crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::InvalidArgumentException(inner) => {
399 Error::InvalidArgumentException(inner)
400 }
401 crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::NotAuthorizedException(inner) => {
402 Error::NotAuthorizedException(inner)
403 }
404 crate::operation::list_performance_analysis_reports::ListPerformanceAnalysisReportsError::Unhandled(inner) => Error::Unhandled(inner),
405 }
406 }
407}
408impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
409where
410 R: Send + Sync + std::fmt::Debug + 'static,
411{
412 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
413 match err {
414 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
415 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
416 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
417 source: err.into(),
418 }),
419 }
420 }
421}
422impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
423 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
424 match err {
425 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner),
426 crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidArgumentException(inner) => {
427 Error::InvalidArgumentException(inner)
428 }
429 crate::operation::list_tags_for_resource::ListTagsForResourceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
430 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
431 }
432 }
433}
434impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
435where
436 R: Send + Sync + std::fmt::Debug + 'static,
437{
438 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
439 match err {
440 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
441 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
442 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
443 source: err.into(),
444 }),
445 }
446 }
447}
448impl From<crate::operation::tag_resource::TagResourceError> for Error {
449 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
450 match err {
451 crate::operation::tag_resource::TagResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner),
452 crate::operation::tag_resource::TagResourceError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner),
453 crate::operation::tag_resource::TagResourceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
454 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
455 }
456 }
457}
458impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
459where
460 R: Send + Sync + std::fmt::Debug + 'static,
461{
462 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
463 match err {
464 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
465 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
466 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
467 source: err.into(),
468 }),
469 }
470 }
471}
472impl From<crate::operation::untag_resource::UntagResourceError> for Error {
473 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
474 match err {
475 crate::operation::untag_resource::UntagResourceError::InternalServiceError(inner) => Error::InternalServiceError(inner),
476 crate::operation::untag_resource::UntagResourceError::InvalidArgumentException(inner) => Error::InvalidArgumentException(inner),
477 crate::operation::untag_resource::UntagResourceError::NotAuthorizedException(inner) => Error::NotAuthorizedException(inner),
478 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
479 }
480 }
481}
482impl ::std::error::Error for Error {
483 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
484 match self {
485 Error::InternalServiceError(inner) => inner.source(),
486 Error::InvalidArgumentException(inner) => inner.source(),
487 Error::NotAuthorizedException(inner) => inner.source(),
488 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
489 }
490 }
491}
492impl ::aws_types::request_id::RequestId for Error {
493 fn request_id(&self) -> Option<&str> {
494 match self {
495 Self::InternalServiceError(e) => e.request_id(),
496 Self::InvalidArgumentException(e) => e.request_id(),
497 Self::NotAuthorizedException(e) => e.request_id(),
498 Self::Unhandled(e) => e.meta.request_id(),
499 }
500 }
501}