1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 #[allow(missing_docs)] BadRequestException(crate::types::error::BadRequestException),
8 #[allow(missing_docs)] ConflictException(crate::types::error::ConflictException),
10 #[allow(missing_docs)] ForbiddenException(crate::types::error::ForbiddenException),
12 #[allow(missing_docs)] GoneException(crate::types::error::GoneException),
14 #[allow(missing_docs)] InternalServerErrorException(crate::types::error::InternalServerErrorException),
16 #[allow(missing_docs)] NotFoundException(crate::types::error::NotFoundException),
18 #[allow(missing_docs)] PreconditionFailedException(crate::types::error::PreconditionFailedException),
20 #[allow(missing_docs)] ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
22 #[allow(missing_docs)] TooManyRequestsException(crate::types::error::TooManyRequestsException),
24 #[allow(missing_docs)] UnauthorizedException(crate::types::error::UnauthorizedException),
26 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
28 variable wildcard pattern and check `.code()`:
29 \
30 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
31 \
32 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
33 Unhandled(crate::error::sealed_unhandled::Unhandled),
34}
35impl ::std::fmt::Display for Error {
36 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37 match self {
38 Error::BadRequestException(inner) => inner.fmt(f),
39 Error::ConflictException(inner) => inner.fmt(f),
40 Error::ForbiddenException(inner) => inner.fmt(f),
41 Error::GoneException(inner) => inner.fmt(f),
42 Error::InternalServerErrorException(inner) => inner.fmt(f),
43 Error::NotFoundException(inner) => inner.fmt(f),
44 Error::PreconditionFailedException(inner) => inner.fmt(f),
45 Error::ServiceUnavailableException(inner) => inner.fmt(f),
46 Error::TooManyRequestsException(inner) => inner.fmt(f),
47 Error::UnauthorizedException(inner) => inner.fmt(f),
48 Error::Unhandled(_) => {
49 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
50 write!(f, "unhandled error ({code})")
51 } else {
52 f.write_str("unhandled error")
53 }
54 }
55 }
56 }
57}
58impl From<::aws_smithy_types::error::operation::BuildError> for Error {
59 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
60 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
61 source: value.into(),
62 meta: ::std::default::Default::default(),
63 })
64 }
65}
66impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
67 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
68 match self {
69 Self::BadRequestException(inner) => inner.meta(),
70 Self::ConflictException(inner) => inner.meta(),
71 Self::ForbiddenException(inner) => inner.meta(),
72 Self::GoneException(inner) => inner.meta(),
73 Self::InternalServerErrorException(inner) => inner.meta(),
74 Self::NotFoundException(inner) => inner.meta(),
75 Self::PreconditionFailedException(inner) => inner.meta(),
76 Self::ServiceUnavailableException(inner) => inner.meta(),
77 Self::TooManyRequestsException(inner) => inner.meta(),
78 Self::UnauthorizedException(inner) => inner.meta(),
79 Self::Unhandled(inner) => &inner.meta,
80 }
81 }
82}
83impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_discoverer::CreateDiscovererError, R>> for Error
84where
85 R: Send + Sync + std::fmt::Debug + 'static,
86{
87 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_discoverer::CreateDiscovererError, R>) -> Self {
88 match err {
89 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
90 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
91 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
92 source: err.into(),
93 }),
94 }
95 }
96}
97impl From<crate::operation::create_discoverer::CreateDiscovererError> for Error {
98 fn from(err: crate::operation::create_discoverer::CreateDiscovererError) -> Self {
99 match err {
100 crate::operation::create_discoverer::CreateDiscovererError::BadRequestException(inner) => Error::BadRequestException(inner),
101 crate::operation::create_discoverer::CreateDiscovererError::ConflictException(inner) => Error::ConflictException(inner),
102 crate::operation::create_discoverer::CreateDiscovererError::ForbiddenException(inner) => Error::ForbiddenException(inner),
103 crate::operation::create_discoverer::CreateDiscovererError::InternalServerErrorException(inner) => {
104 Error::InternalServerErrorException(inner)
105 }
106 crate::operation::create_discoverer::CreateDiscovererError::ServiceUnavailableException(inner) => {
107 Error::ServiceUnavailableException(inner)
108 }
109 crate::operation::create_discoverer::CreateDiscovererError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
110 crate::operation::create_discoverer::CreateDiscovererError::Unhandled(inner) => Error::Unhandled(inner),
111 }
112 }
113}
114impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_registry::CreateRegistryError, R>> for Error
115where
116 R: Send + Sync + std::fmt::Debug + 'static,
117{
118 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_registry::CreateRegistryError, R>) -> Self {
119 match err {
120 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
121 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
122 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
123 source: err.into(),
124 }),
125 }
126 }
127}
128impl From<crate::operation::create_registry::CreateRegistryError> for Error {
129 fn from(err: crate::operation::create_registry::CreateRegistryError) -> Self {
130 match err {
131 crate::operation::create_registry::CreateRegistryError::BadRequestException(inner) => Error::BadRequestException(inner),
132 crate::operation::create_registry::CreateRegistryError::ConflictException(inner) => Error::ConflictException(inner),
133 crate::operation::create_registry::CreateRegistryError::ForbiddenException(inner) => Error::ForbiddenException(inner),
134 crate::operation::create_registry::CreateRegistryError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
135 crate::operation::create_registry::CreateRegistryError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
136 crate::operation::create_registry::CreateRegistryError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
137 crate::operation::create_registry::CreateRegistryError::Unhandled(inner) => Error::Unhandled(inner),
138 }
139 }
140}
141impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_schema::CreateSchemaError, R>> for Error
142where
143 R: Send + Sync + std::fmt::Debug + 'static,
144{
145 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_schema::CreateSchemaError, R>) -> Self {
146 match err {
147 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
148 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
149 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
150 source: err.into(),
151 }),
152 }
153 }
154}
155impl From<crate::operation::create_schema::CreateSchemaError> for Error {
156 fn from(err: crate::operation::create_schema::CreateSchemaError) -> Self {
157 match err {
158 crate::operation::create_schema::CreateSchemaError::BadRequestException(inner) => Error::BadRequestException(inner),
159 crate::operation::create_schema::CreateSchemaError::ForbiddenException(inner) => Error::ForbiddenException(inner),
160 crate::operation::create_schema::CreateSchemaError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
161 crate::operation::create_schema::CreateSchemaError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
162 crate::operation::create_schema::CreateSchemaError::Unhandled(inner) => Error::Unhandled(inner),
163 }
164 }
165}
166impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_discoverer::DeleteDiscovererError, R>> for Error
167where
168 R: Send + Sync + std::fmt::Debug + 'static,
169{
170 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_discoverer::DeleteDiscovererError, R>) -> Self {
171 match err {
172 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
173 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
174 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
175 source: err.into(),
176 }),
177 }
178 }
179}
180impl From<crate::operation::delete_discoverer::DeleteDiscovererError> for Error {
181 fn from(err: crate::operation::delete_discoverer::DeleteDiscovererError) -> Self {
182 match err {
183 crate::operation::delete_discoverer::DeleteDiscovererError::BadRequestException(inner) => Error::BadRequestException(inner),
184 crate::operation::delete_discoverer::DeleteDiscovererError::ForbiddenException(inner) => Error::ForbiddenException(inner),
185 crate::operation::delete_discoverer::DeleteDiscovererError::InternalServerErrorException(inner) => {
186 Error::InternalServerErrorException(inner)
187 }
188 crate::operation::delete_discoverer::DeleteDiscovererError::NotFoundException(inner) => Error::NotFoundException(inner),
189 crate::operation::delete_discoverer::DeleteDiscovererError::ServiceUnavailableException(inner) => {
190 Error::ServiceUnavailableException(inner)
191 }
192 crate::operation::delete_discoverer::DeleteDiscovererError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
193 crate::operation::delete_discoverer::DeleteDiscovererError::Unhandled(inner) => Error::Unhandled(inner),
194 }
195 }
196}
197impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_registry::DeleteRegistryError, R>> for Error
198where
199 R: Send + Sync + std::fmt::Debug + 'static,
200{
201 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_registry::DeleteRegistryError, R>) -> Self {
202 match err {
203 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
204 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
205 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
206 source: err.into(),
207 }),
208 }
209 }
210}
211impl From<crate::operation::delete_registry::DeleteRegistryError> for Error {
212 fn from(err: crate::operation::delete_registry::DeleteRegistryError) -> Self {
213 match err {
214 crate::operation::delete_registry::DeleteRegistryError::BadRequestException(inner) => Error::BadRequestException(inner),
215 crate::operation::delete_registry::DeleteRegistryError::ForbiddenException(inner) => Error::ForbiddenException(inner),
216 crate::operation::delete_registry::DeleteRegistryError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
217 crate::operation::delete_registry::DeleteRegistryError::NotFoundException(inner) => Error::NotFoundException(inner),
218 crate::operation::delete_registry::DeleteRegistryError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
219 crate::operation::delete_registry::DeleteRegistryError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
220 crate::operation::delete_registry::DeleteRegistryError::Unhandled(inner) => Error::Unhandled(inner),
221 }
222 }
223}
224impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>> for Error
225where
226 R: Send + Sync + std::fmt::Debug + 'static,
227{
228 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>) -> Self {
229 match err {
230 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
231 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
232 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
233 source: err.into(),
234 }),
235 }
236 }
237}
238impl From<crate::operation::delete_resource_policy::DeleteResourcePolicyError> for Error {
239 fn from(err: crate::operation::delete_resource_policy::DeleteResourcePolicyError) -> Self {
240 match err {
241 crate::operation::delete_resource_policy::DeleteResourcePolicyError::BadRequestException(inner) => Error::BadRequestException(inner),
242 crate::operation::delete_resource_policy::DeleteResourcePolicyError::ForbiddenException(inner) => Error::ForbiddenException(inner),
243 crate::operation::delete_resource_policy::DeleteResourcePolicyError::InternalServerErrorException(inner) => {
244 Error::InternalServerErrorException(inner)
245 }
246 crate::operation::delete_resource_policy::DeleteResourcePolicyError::NotFoundException(inner) => Error::NotFoundException(inner),
247 crate::operation::delete_resource_policy::DeleteResourcePolicyError::ServiceUnavailableException(inner) => {
248 Error::ServiceUnavailableException(inner)
249 }
250 crate::operation::delete_resource_policy::DeleteResourcePolicyError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
251 crate::operation::delete_resource_policy::DeleteResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
252 }
253 }
254}
255impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_schema::DeleteSchemaError, R>> for Error
256where
257 R: Send + Sync + std::fmt::Debug + 'static,
258{
259 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_schema::DeleteSchemaError, R>) -> Self {
260 match err {
261 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
262 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
263 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
264 source: err.into(),
265 }),
266 }
267 }
268}
269impl From<crate::operation::delete_schema::DeleteSchemaError> for Error {
270 fn from(err: crate::operation::delete_schema::DeleteSchemaError) -> Self {
271 match err {
272 crate::operation::delete_schema::DeleteSchemaError::BadRequestException(inner) => Error::BadRequestException(inner),
273 crate::operation::delete_schema::DeleteSchemaError::ForbiddenException(inner) => Error::ForbiddenException(inner),
274 crate::operation::delete_schema::DeleteSchemaError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
275 crate::operation::delete_schema::DeleteSchemaError::NotFoundException(inner) => Error::NotFoundException(inner),
276 crate::operation::delete_schema::DeleteSchemaError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
277 crate::operation::delete_schema::DeleteSchemaError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
278 crate::operation::delete_schema::DeleteSchemaError::Unhandled(inner) => Error::Unhandled(inner),
279 }
280 }
281}
282impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_schema_version::DeleteSchemaVersionError, R>> for Error
283where
284 R: Send + Sync + std::fmt::Debug + 'static,
285{
286 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_schema_version::DeleteSchemaVersionError, R>) -> Self {
287 match err {
288 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
289 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
290 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
291 source: err.into(),
292 }),
293 }
294 }
295}
296impl From<crate::operation::delete_schema_version::DeleteSchemaVersionError> for Error {
297 fn from(err: crate::operation::delete_schema_version::DeleteSchemaVersionError) -> Self {
298 match err {
299 crate::operation::delete_schema_version::DeleteSchemaVersionError::BadRequestException(inner) => Error::BadRequestException(inner),
300 crate::operation::delete_schema_version::DeleteSchemaVersionError::ForbiddenException(inner) => Error::ForbiddenException(inner),
301 crate::operation::delete_schema_version::DeleteSchemaVersionError::InternalServerErrorException(inner) => {
302 Error::InternalServerErrorException(inner)
303 }
304 crate::operation::delete_schema_version::DeleteSchemaVersionError::NotFoundException(inner) => Error::NotFoundException(inner),
305 crate::operation::delete_schema_version::DeleteSchemaVersionError::ServiceUnavailableException(inner) => {
306 Error::ServiceUnavailableException(inner)
307 }
308 crate::operation::delete_schema_version::DeleteSchemaVersionError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
309 crate::operation::delete_schema_version::DeleteSchemaVersionError::Unhandled(inner) => Error::Unhandled(inner),
310 }
311 }
312}
313impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_code_binding::DescribeCodeBindingError, R>> for Error
314where
315 R: Send + Sync + std::fmt::Debug + 'static,
316{
317 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_code_binding::DescribeCodeBindingError, R>) -> Self {
318 match err {
319 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
320 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
321 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
322 source: err.into(),
323 }),
324 }
325 }
326}
327impl From<crate::operation::describe_code_binding::DescribeCodeBindingError> for Error {
328 fn from(err: crate::operation::describe_code_binding::DescribeCodeBindingError) -> Self {
329 match err {
330 crate::operation::describe_code_binding::DescribeCodeBindingError::BadRequestException(inner) => Error::BadRequestException(inner),
331 crate::operation::describe_code_binding::DescribeCodeBindingError::ForbiddenException(inner) => Error::ForbiddenException(inner),
332 crate::operation::describe_code_binding::DescribeCodeBindingError::InternalServerErrorException(inner) => {
333 Error::InternalServerErrorException(inner)
334 }
335 crate::operation::describe_code_binding::DescribeCodeBindingError::NotFoundException(inner) => Error::NotFoundException(inner),
336 crate::operation::describe_code_binding::DescribeCodeBindingError::TooManyRequestsException(inner) => {
337 Error::TooManyRequestsException(inner)
338 }
339 crate::operation::describe_code_binding::DescribeCodeBindingError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
340 crate::operation::describe_code_binding::DescribeCodeBindingError::Unhandled(inner) => Error::Unhandled(inner),
341 }
342 }
343}
344impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_discoverer::DescribeDiscovererError, R>> for Error
345where
346 R: Send + Sync + std::fmt::Debug + 'static,
347{
348 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_discoverer::DescribeDiscovererError, R>) -> Self {
349 match err {
350 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
351 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
352 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
353 source: err.into(),
354 }),
355 }
356 }
357}
358impl From<crate::operation::describe_discoverer::DescribeDiscovererError> for Error {
359 fn from(err: crate::operation::describe_discoverer::DescribeDiscovererError) -> Self {
360 match err {
361 crate::operation::describe_discoverer::DescribeDiscovererError::BadRequestException(inner) => Error::BadRequestException(inner),
362 crate::operation::describe_discoverer::DescribeDiscovererError::ForbiddenException(inner) => Error::ForbiddenException(inner),
363 crate::operation::describe_discoverer::DescribeDiscovererError::InternalServerErrorException(inner) => {
364 Error::InternalServerErrorException(inner)
365 }
366 crate::operation::describe_discoverer::DescribeDiscovererError::NotFoundException(inner) => Error::NotFoundException(inner),
367 crate::operation::describe_discoverer::DescribeDiscovererError::ServiceUnavailableException(inner) => {
368 Error::ServiceUnavailableException(inner)
369 }
370 crate::operation::describe_discoverer::DescribeDiscovererError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
371 crate::operation::describe_discoverer::DescribeDiscovererError::Unhandled(inner) => Error::Unhandled(inner),
372 }
373 }
374}
375impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_registry::DescribeRegistryError, R>> for Error
376where
377 R: Send + Sync + std::fmt::Debug + 'static,
378{
379 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_registry::DescribeRegistryError, R>) -> Self {
380 match err {
381 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
382 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
383 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
384 source: err.into(),
385 }),
386 }
387 }
388}
389impl From<crate::operation::describe_registry::DescribeRegistryError> for Error {
390 fn from(err: crate::operation::describe_registry::DescribeRegistryError) -> Self {
391 match err {
392 crate::operation::describe_registry::DescribeRegistryError::BadRequestException(inner) => Error::BadRequestException(inner),
393 crate::operation::describe_registry::DescribeRegistryError::ForbiddenException(inner) => Error::ForbiddenException(inner),
394 crate::operation::describe_registry::DescribeRegistryError::InternalServerErrorException(inner) => {
395 Error::InternalServerErrorException(inner)
396 }
397 crate::operation::describe_registry::DescribeRegistryError::NotFoundException(inner) => Error::NotFoundException(inner),
398 crate::operation::describe_registry::DescribeRegistryError::ServiceUnavailableException(inner) => {
399 Error::ServiceUnavailableException(inner)
400 }
401 crate::operation::describe_registry::DescribeRegistryError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
402 crate::operation::describe_registry::DescribeRegistryError::Unhandled(inner) => Error::Unhandled(inner),
403 }
404 }
405}
406impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_schema::DescribeSchemaError, R>> for Error
407where
408 R: Send + Sync + std::fmt::Debug + 'static,
409{
410 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_schema::DescribeSchemaError, R>) -> Self {
411 match err {
412 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
413 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
414 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
415 source: err.into(),
416 }),
417 }
418 }
419}
420impl From<crate::operation::describe_schema::DescribeSchemaError> for Error {
421 fn from(err: crate::operation::describe_schema::DescribeSchemaError) -> Self {
422 match err {
423 crate::operation::describe_schema::DescribeSchemaError::BadRequestException(inner) => Error::BadRequestException(inner),
424 crate::operation::describe_schema::DescribeSchemaError::ForbiddenException(inner) => Error::ForbiddenException(inner),
425 crate::operation::describe_schema::DescribeSchemaError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
426 crate::operation::describe_schema::DescribeSchemaError::NotFoundException(inner) => Error::NotFoundException(inner),
427 crate::operation::describe_schema::DescribeSchemaError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
428 crate::operation::describe_schema::DescribeSchemaError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
429 crate::operation::describe_schema::DescribeSchemaError::Unhandled(inner) => Error::Unhandled(inner),
430 }
431 }
432}
433impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_schema::ExportSchemaError, R>> for Error
434where
435 R: Send + Sync + std::fmt::Debug + 'static,
436{
437 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_schema::ExportSchemaError, R>) -> Self {
438 match err {
439 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
440 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
441 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
442 source: err.into(),
443 }),
444 }
445 }
446}
447impl From<crate::operation::export_schema::ExportSchemaError> for Error {
448 fn from(err: crate::operation::export_schema::ExportSchemaError) -> Self {
449 match err {
450 crate::operation::export_schema::ExportSchemaError::BadRequestException(inner) => Error::BadRequestException(inner),
451 crate::operation::export_schema::ExportSchemaError::ForbiddenException(inner) => Error::ForbiddenException(inner),
452 crate::operation::export_schema::ExportSchemaError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
453 crate::operation::export_schema::ExportSchemaError::NotFoundException(inner) => Error::NotFoundException(inner),
454 crate::operation::export_schema::ExportSchemaError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
455 crate::operation::export_schema::ExportSchemaError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
456 crate::operation::export_schema::ExportSchemaError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
457 crate::operation::export_schema::ExportSchemaError::Unhandled(inner) => Error::Unhandled(inner),
458 }
459 }
460}
461impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_code_binding_source::GetCodeBindingSourceError, R>> for Error
462where
463 R: Send + Sync + std::fmt::Debug + 'static,
464{
465 fn from(
466 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_code_binding_source::GetCodeBindingSourceError, R>,
467 ) -> Self {
468 match err {
469 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
470 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
471 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
472 source: err.into(),
473 }),
474 }
475 }
476}
477impl From<crate::operation::get_code_binding_source::GetCodeBindingSourceError> for Error {
478 fn from(err: crate::operation::get_code_binding_source::GetCodeBindingSourceError) -> Self {
479 match err {
480 crate::operation::get_code_binding_source::GetCodeBindingSourceError::BadRequestException(inner) => Error::BadRequestException(inner),
481 crate::operation::get_code_binding_source::GetCodeBindingSourceError::ForbiddenException(inner) => Error::ForbiddenException(inner),
482 crate::operation::get_code_binding_source::GetCodeBindingSourceError::InternalServerErrorException(inner) => {
483 Error::InternalServerErrorException(inner)
484 }
485 crate::operation::get_code_binding_source::GetCodeBindingSourceError::NotFoundException(inner) => Error::NotFoundException(inner),
486 crate::operation::get_code_binding_source::GetCodeBindingSourceError::TooManyRequestsException(inner) => {
487 Error::TooManyRequestsException(inner)
488 }
489 crate::operation::get_code_binding_source::GetCodeBindingSourceError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
490 crate::operation::get_code_binding_source::GetCodeBindingSourceError::Unhandled(inner) => Error::Unhandled(inner),
491 }
492 }
493}
494impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_discovered_schema::GetDiscoveredSchemaError, R>> for Error
495where
496 R: Send + Sync + std::fmt::Debug + 'static,
497{
498 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_discovered_schema::GetDiscoveredSchemaError, R>) -> Self {
499 match err {
500 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
501 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
502 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
503 source: err.into(),
504 }),
505 }
506 }
507}
508impl From<crate::operation::get_discovered_schema::GetDiscoveredSchemaError> for Error {
509 fn from(err: crate::operation::get_discovered_schema::GetDiscoveredSchemaError) -> Self {
510 match err {
511 crate::operation::get_discovered_schema::GetDiscoveredSchemaError::BadRequestException(inner) => Error::BadRequestException(inner),
512 crate::operation::get_discovered_schema::GetDiscoveredSchemaError::ForbiddenException(inner) => Error::ForbiddenException(inner),
513 crate::operation::get_discovered_schema::GetDiscoveredSchemaError::InternalServerErrorException(inner) => {
514 Error::InternalServerErrorException(inner)
515 }
516 crate::operation::get_discovered_schema::GetDiscoveredSchemaError::ServiceUnavailableException(inner) => {
517 Error::ServiceUnavailableException(inner)
518 }
519 crate::operation::get_discovered_schema::GetDiscoveredSchemaError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
520 crate::operation::get_discovered_schema::GetDiscoveredSchemaError::Unhandled(inner) => Error::Unhandled(inner),
521 }
522 }
523}
524impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_policy::GetResourcePolicyError, R>> for Error
525where
526 R: Send + Sync + std::fmt::Debug + 'static,
527{
528 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_resource_policy::GetResourcePolicyError, R>) -> Self {
529 match err {
530 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
531 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
532 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
533 source: err.into(),
534 }),
535 }
536 }
537}
538impl From<crate::operation::get_resource_policy::GetResourcePolicyError> for Error {
539 fn from(err: crate::operation::get_resource_policy::GetResourcePolicyError) -> Self {
540 match err {
541 crate::operation::get_resource_policy::GetResourcePolicyError::BadRequestException(inner) => Error::BadRequestException(inner),
542 crate::operation::get_resource_policy::GetResourcePolicyError::ForbiddenException(inner) => Error::ForbiddenException(inner),
543 crate::operation::get_resource_policy::GetResourcePolicyError::InternalServerErrorException(inner) => {
544 Error::InternalServerErrorException(inner)
545 }
546 crate::operation::get_resource_policy::GetResourcePolicyError::NotFoundException(inner) => Error::NotFoundException(inner),
547 crate::operation::get_resource_policy::GetResourcePolicyError::ServiceUnavailableException(inner) => {
548 Error::ServiceUnavailableException(inner)
549 }
550 crate::operation::get_resource_policy::GetResourcePolicyError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
551 crate::operation::get_resource_policy::GetResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
552 }
553 }
554}
555impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_discoverers::ListDiscoverersError, R>> for Error
556where
557 R: Send + Sync + std::fmt::Debug + 'static,
558{
559 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_discoverers::ListDiscoverersError, R>) -> Self {
560 match err {
561 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
562 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
563 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
564 source: err.into(),
565 }),
566 }
567 }
568}
569impl From<crate::operation::list_discoverers::ListDiscoverersError> for Error {
570 fn from(err: crate::operation::list_discoverers::ListDiscoverersError) -> Self {
571 match err {
572 crate::operation::list_discoverers::ListDiscoverersError::BadRequestException(inner) => Error::BadRequestException(inner),
573 crate::operation::list_discoverers::ListDiscoverersError::ForbiddenException(inner) => Error::ForbiddenException(inner),
574 crate::operation::list_discoverers::ListDiscoverersError::InternalServerErrorException(inner) => {
575 Error::InternalServerErrorException(inner)
576 }
577 crate::operation::list_discoverers::ListDiscoverersError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
578 crate::operation::list_discoverers::ListDiscoverersError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
579 crate::operation::list_discoverers::ListDiscoverersError::Unhandled(inner) => Error::Unhandled(inner),
580 }
581 }
582}
583impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_registries::ListRegistriesError, R>> for Error
584where
585 R: Send + Sync + std::fmt::Debug + 'static,
586{
587 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_registries::ListRegistriesError, R>) -> Self {
588 match err {
589 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
590 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
591 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
592 source: err.into(),
593 }),
594 }
595 }
596}
597impl From<crate::operation::list_registries::ListRegistriesError> for Error {
598 fn from(err: crate::operation::list_registries::ListRegistriesError) -> Self {
599 match err {
600 crate::operation::list_registries::ListRegistriesError::BadRequestException(inner) => Error::BadRequestException(inner),
601 crate::operation::list_registries::ListRegistriesError::ForbiddenException(inner) => Error::ForbiddenException(inner),
602 crate::operation::list_registries::ListRegistriesError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
603 crate::operation::list_registries::ListRegistriesError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
604 crate::operation::list_registries::ListRegistriesError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
605 crate::operation::list_registries::ListRegistriesError::Unhandled(inner) => Error::Unhandled(inner),
606 }
607 }
608}
609impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_schemas::ListSchemasError, R>> for Error
610where
611 R: Send + Sync + std::fmt::Debug + 'static,
612{
613 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_schemas::ListSchemasError, R>) -> Self {
614 match err {
615 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
616 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
617 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
618 source: err.into(),
619 }),
620 }
621 }
622}
623impl From<crate::operation::list_schemas::ListSchemasError> for Error {
624 fn from(err: crate::operation::list_schemas::ListSchemasError) -> Self {
625 match err {
626 crate::operation::list_schemas::ListSchemasError::BadRequestException(inner) => Error::BadRequestException(inner),
627 crate::operation::list_schemas::ListSchemasError::ForbiddenException(inner) => Error::ForbiddenException(inner),
628 crate::operation::list_schemas::ListSchemasError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
629 crate::operation::list_schemas::ListSchemasError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
630 crate::operation::list_schemas::ListSchemasError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
631 crate::operation::list_schemas::ListSchemasError::Unhandled(inner) => Error::Unhandled(inner),
632 }
633 }
634}
635impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_schema_versions::ListSchemaVersionsError, R>> for Error
636where
637 R: Send + Sync + std::fmt::Debug + 'static,
638{
639 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_schema_versions::ListSchemaVersionsError, R>) -> Self {
640 match err {
641 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
642 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
643 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
644 source: err.into(),
645 }),
646 }
647 }
648}
649impl From<crate::operation::list_schema_versions::ListSchemaVersionsError> for Error {
650 fn from(err: crate::operation::list_schema_versions::ListSchemaVersionsError) -> Self {
651 match err {
652 crate::operation::list_schema_versions::ListSchemaVersionsError::BadRequestException(inner) => Error::BadRequestException(inner),
653 crate::operation::list_schema_versions::ListSchemaVersionsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
654 crate::operation::list_schema_versions::ListSchemaVersionsError::InternalServerErrorException(inner) => {
655 Error::InternalServerErrorException(inner)
656 }
657 crate::operation::list_schema_versions::ListSchemaVersionsError::NotFoundException(inner) => Error::NotFoundException(inner),
658 crate::operation::list_schema_versions::ListSchemaVersionsError::ServiceUnavailableException(inner) => {
659 Error::ServiceUnavailableException(inner)
660 }
661 crate::operation::list_schema_versions::ListSchemaVersionsError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
662 crate::operation::list_schema_versions::ListSchemaVersionsError::Unhandled(inner) => Error::Unhandled(inner),
663 }
664 }
665}
666impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
667where
668 R: Send + Sync + std::fmt::Debug + 'static,
669{
670 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
671 match err {
672 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
673 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
674 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
675 source: err.into(),
676 }),
677 }
678 }
679}
680impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
681 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
682 match err {
683 crate::operation::list_tags_for_resource::ListTagsForResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
684 crate::operation::list_tags_for_resource::ListTagsForResourceError::ForbiddenException(inner) => Error::ForbiddenException(inner),
685 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerErrorException(inner) => {
686 Error::InternalServerErrorException(inner)
687 }
688 crate::operation::list_tags_for_resource::ListTagsForResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
689 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
690 }
691 }
692}
693impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_code_binding::PutCodeBindingError, 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::put_code_binding::PutCodeBindingError, 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::put_code_binding::PutCodeBindingError> for Error {
708 fn from(err: crate::operation::put_code_binding::PutCodeBindingError) -> Self {
709 match err {
710 crate::operation::put_code_binding::PutCodeBindingError::BadRequestException(inner) => Error::BadRequestException(inner),
711 crate::operation::put_code_binding::PutCodeBindingError::ForbiddenException(inner) => Error::ForbiddenException(inner),
712 crate::operation::put_code_binding::PutCodeBindingError::GoneException(inner) => Error::GoneException(inner),
713 crate::operation::put_code_binding::PutCodeBindingError::InternalServerErrorException(inner) => {
714 Error::InternalServerErrorException(inner)
715 }
716 crate::operation::put_code_binding::PutCodeBindingError::NotFoundException(inner) => Error::NotFoundException(inner),
717 crate::operation::put_code_binding::PutCodeBindingError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
718 crate::operation::put_code_binding::PutCodeBindingError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
719 crate::operation::put_code_binding::PutCodeBindingError::Unhandled(inner) => Error::Unhandled(inner),
720 }
721 }
722}
723impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>> for Error
724where
725 R: Send + Sync + std::fmt::Debug + 'static,
726{
727 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>) -> Self {
728 match err {
729 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
730 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
731 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
732 source: err.into(),
733 }),
734 }
735 }
736}
737impl From<crate::operation::put_resource_policy::PutResourcePolicyError> for Error {
738 fn from(err: crate::operation::put_resource_policy::PutResourcePolicyError) -> Self {
739 match err {
740 crate::operation::put_resource_policy::PutResourcePolicyError::BadRequestException(inner) => Error::BadRequestException(inner),
741 crate::operation::put_resource_policy::PutResourcePolicyError::ForbiddenException(inner) => Error::ForbiddenException(inner),
742 crate::operation::put_resource_policy::PutResourcePolicyError::InternalServerErrorException(inner) => {
743 Error::InternalServerErrorException(inner)
744 }
745 crate::operation::put_resource_policy::PutResourcePolicyError::NotFoundException(inner) => Error::NotFoundException(inner),
746 crate::operation::put_resource_policy::PutResourcePolicyError::PreconditionFailedException(inner) => {
747 Error::PreconditionFailedException(inner)
748 }
749 crate::operation::put_resource_policy::PutResourcePolicyError::ServiceUnavailableException(inner) => {
750 Error::ServiceUnavailableException(inner)
751 }
752 crate::operation::put_resource_policy::PutResourcePolicyError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
753 crate::operation::put_resource_policy::PutResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
754 }
755 }
756}
757impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_schemas::SearchSchemasError, R>> for Error
758where
759 R: Send + Sync + std::fmt::Debug + 'static,
760{
761 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::search_schemas::SearchSchemasError, R>) -> Self {
762 match err {
763 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
764 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
765 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
766 source: err.into(),
767 }),
768 }
769 }
770}
771impl From<crate::operation::search_schemas::SearchSchemasError> for Error {
772 fn from(err: crate::operation::search_schemas::SearchSchemasError) -> Self {
773 match err {
774 crate::operation::search_schemas::SearchSchemasError::BadRequestException(inner) => Error::BadRequestException(inner),
775 crate::operation::search_schemas::SearchSchemasError::ForbiddenException(inner) => Error::ForbiddenException(inner),
776 crate::operation::search_schemas::SearchSchemasError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
777 crate::operation::search_schemas::SearchSchemasError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
778 crate::operation::search_schemas::SearchSchemasError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
779 crate::operation::search_schemas::SearchSchemasError::Unhandled(inner) => Error::Unhandled(inner),
780 }
781 }
782}
783impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_discoverer::StartDiscovererError, R>> for Error
784where
785 R: Send + Sync + std::fmt::Debug + 'static,
786{
787 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_discoverer::StartDiscovererError, R>) -> Self {
788 match err {
789 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
790 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
791 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
792 source: err.into(),
793 }),
794 }
795 }
796}
797impl From<crate::operation::start_discoverer::StartDiscovererError> for Error {
798 fn from(err: crate::operation::start_discoverer::StartDiscovererError) -> Self {
799 match err {
800 crate::operation::start_discoverer::StartDiscovererError::BadRequestException(inner) => Error::BadRequestException(inner),
801 crate::operation::start_discoverer::StartDiscovererError::ForbiddenException(inner) => Error::ForbiddenException(inner),
802 crate::operation::start_discoverer::StartDiscovererError::InternalServerErrorException(inner) => {
803 Error::InternalServerErrorException(inner)
804 }
805 crate::operation::start_discoverer::StartDiscovererError::NotFoundException(inner) => Error::NotFoundException(inner),
806 crate::operation::start_discoverer::StartDiscovererError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
807 crate::operation::start_discoverer::StartDiscovererError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
808 crate::operation::start_discoverer::StartDiscovererError::Unhandled(inner) => Error::Unhandled(inner),
809 }
810 }
811}
812impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_discoverer::StopDiscovererError, R>> for Error
813where
814 R: Send + Sync + std::fmt::Debug + 'static,
815{
816 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_discoverer::StopDiscovererError, R>) -> Self {
817 match err {
818 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
819 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
820 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
821 source: err.into(),
822 }),
823 }
824 }
825}
826impl From<crate::operation::stop_discoverer::StopDiscovererError> for Error {
827 fn from(err: crate::operation::stop_discoverer::StopDiscovererError) -> Self {
828 match err {
829 crate::operation::stop_discoverer::StopDiscovererError::BadRequestException(inner) => Error::BadRequestException(inner),
830 crate::operation::stop_discoverer::StopDiscovererError::ForbiddenException(inner) => Error::ForbiddenException(inner),
831 crate::operation::stop_discoverer::StopDiscovererError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
832 crate::operation::stop_discoverer::StopDiscovererError::NotFoundException(inner) => Error::NotFoundException(inner),
833 crate::operation::stop_discoverer::StopDiscovererError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
834 crate::operation::stop_discoverer::StopDiscovererError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
835 crate::operation::stop_discoverer::StopDiscovererError::Unhandled(inner) => Error::Unhandled(inner),
836 }
837 }
838}
839impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
840where
841 R: Send + Sync + std::fmt::Debug + 'static,
842{
843 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
844 match err {
845 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
846 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
847 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
848 source: err.into(),
849 }),
850 }
851 }
852}
853impl From<crate::operation::tag_resource::TagResourceError> for Error {
854 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
855 match err {
856 crate::operation::tag_resource::TagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
857 crate::operation::tag_resource::TagResourceError::ForbiddenException(inner) => Error::ForbiddenException(inner),
858 crate::operation::tag_resource::TagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
859 crate::operation::tag_resource::TagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
860 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
861 }
862 }
863}
864impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
865where
866 R: Send + Sync + std::fmt::Debug + 'static,
867{
868 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
869 match err {
870 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
871 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
872 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
873 source: err.into(),
874 }),
875 }
876 }
877}
878impl From<crate::operation::untag_resource::UntagResourceError> for Error {
879 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
880 match err {
881 crate::operation::untag_resource::UntagResourceError::BadRequestException(inner) => Error::BadRequestException(inner),
882 crate::operation::untag_resource::UntagResourceError::ForbiddenException(inner) => Error::ForbiddenException(inner),
883 crate::operation::untag_resource::UntagResourceError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
884 crate::operation::untag_resource::UntagResourceError::NotFoundException(inner) => Error::NotFoundException(inner),
885 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
886 }
887 }
888}
889impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_discoverer::UpdateDiscovererError, R>> for Error
890where
891 R: Send + Sync + std::fmt::Debug + 'static,
892{
893 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_discoverer::UpdateDiscovererError, R>) -> Self {
894 match err {
895 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
896 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
897 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
898 source: err.into(),
899 }),
900 }
901 }
902}
903impl From<crate::operation::update_discoverer::UpdateDiscovererError> for Error {
904 fn from(err: crate::operation::update_discoverer::UpdateDiscovererError) -> Self {
905 match err {
906 crate::operation::update_discoverer::UpdateDiscovererError::BadRequestException(inner) => Error::BadRequestException(inner),
907 crate::operation::update_discoverer::UpdateDiscovererError::ForbiddenException(inner) => Error::ForbiddenException(inner),
908 crate::operation::update_discoverer::UpdateDiscovererError::InternalServerErrorException(inner) => {
909 Error::InternalServerErrorException(inner)
910 }
911 crate::operation::update_discoverer::UpdateDiscovererError::NotFoundException(inner) => Error::NotFoundException(inner),
912 crate::operation::update_discoverer::UpdateDiscovererError::ServiceUnavailableException(inner) => {
913 Error::ServiceUnavailableException(inner)
914 }
915 crate::operation::update_discoverer::UpdateDiscovererError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
916 crate::operation::update_discoverer::UpdateDiscovererError::Unhandled(inner) => Error::Unhandled(inner),
917 }
918 }
919}
920impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_registry::UpdateRegistryError, R>> for Error
921where
922 R: Send + Sync + std::fmt::Debug + 'static,
923{
924 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_registry::UpdateRegistryError, R>) -> Self {
925 match err {
926 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
927 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
928 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
929 source: err.into(),
930 }),
931 }
932 }
933}
934impl From<crate::operation::update_registry::UpdateRegistryError> for Error {
935 fn from(err: crate::operation::update_registry::UpdateRegistryError) -> Self {
936 match err {
937 crate::operation::update_registry::UpdateRegistryError::BadRequestException(inner) => Error::BadRequestException(inner),
938 crate::operation::update_registry::UpdateRegistryError::ForbiddenException(inner) => Error::ForbiddenException(inner),
939 crate::operation::update_registry::UpdateRegistryError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
940 crate::operation::update_registry::UpdateRegistryError::NotFoundException(inner) => Error::NotFoundException(inner),
941 crate::operation::update_registry::UpdateRegistryError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
942 crate::operation::update_registry::UpdateRegistryError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
943 crate::operation::update_registry::UpdateRegistryError::Unhandled(inner) => Error::Unhandled(inner),
944 }
945 }
946}
947impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_schema::UpdateSchemaError, R>> for Error
948where
949 R: Send + Sync + std::fmt::Debug + 'static,
950{
951 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_schema::UpdateSchemaError, R>) -> Self {
952 match err {
953 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
954 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
955 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
956 source: err.into(),
957 }),
958 }
959 }
960}
961impl From<crate::operation::update_schema::UpdateSchemaError> for Error {
962 fn from(err: crate::operation::update_schema::UpdateSchemaError) -> Self {
963 match err {
964 crate::operation::update_schema::UpdateSchemaError::BadRequestException(inner) => Error::BadRequestException(inner),
965 crate::operation::update_schema::UpdateSchemaError::ForbiddenException(inner) => Error::ForbiddenException(inner),
966 crate::operation::update_schema::UpdateSchemaError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
967 crate::operation::update_schema::UpdateSchemaError::NotFoundException(inner) => Error::NotFoundException(inner),
968 crate::operation::update_schema::UpdateSchemaError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
969 crate::operation::update_schema::UpdateSchemaError::Unhandled(inner) => Error::Unhandled(inner),
970 }
971 }
972}
973impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
974where
975 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
976 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
977{
978 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
979 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
980 meta: ::std::default::Default::default(),
981 source: err.into(),
982 })
983 }
984}
985impl ::std::error::Error for Error {
986 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
987 match self {
988 Error::BadRequestException(inner) => inner.source(),
989 Error::ConflictException(inner) => inner.source(),
990 Error::ForbiddenException(inner) => inner.source(),
991 Error::GoneException(inner) => inner.source(),
992 Error::InternalServerErrorException(inner) => inner.source(),
993 Error::NotFoundException(inner) => inner.source(),
994 Error::PreconditionFailedException(inner) => inner.source(),
995 Error::ServiceUnavailableException(inner) => inner.source(),
996 Error::TooManyRequestsException(inner) => inner.source(),
997 Error::UnauthorizedException(inner) => inner.source(),
998 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
999 }
1000 }
1001}
1002impl ::aws_types::request_id::RequestId for Error {
1003 fn request_id(&self) -> Option<&str> {
1004 match self {
1005 Self::BadRequestException(e) => e.request_id(),
1006 Self::ConflictException(e) => e.request_id(),
1007 Self::ForbiddenException(e) => e.request_id(),
1008 Self::GoneException(e) => e.request_id(),
1009 Self::InternalServerErrorException(e) => e.request_id(),
1010 Self::NotFoundException(e) => e.request_id(),
1011 Self::PreconditionFailedException(e) => e.request_id(),
1012 Self::ServiceUnavailableException(e) => e.request_id(),
1013 Self::TooManyRequestsException(e) => e.request_id(),
1014 Self::UnauthorizedException(e) => e.request_id(),
1015 Self::Unhandled(e) => e.meta.request_id(),
1016 }
1017 }
1018}