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