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 ThrottlingException(crate::types::error::ThrottlingException),
16 ValidationException(crate::types::error::ValidationException),
18 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
20 variable wildcard pattern and check `.code()`:
21 \
22 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
23 \
24 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
25 Unhandled(crate::error::sealed_unhandled::Unhandled),
26}
27impl ::std::fmt::Display for Error {
28 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29 match self {
30 Error::AccessDeniedException(inner) => inner.fmt(f),
31 Error::ConflictException(inner) => inner.fmt(f),
32 Error::InternalServerException(inner) => inner.fmt(f),
33 Error::ResourceNotFoundException(inner) => inner.fmt(f),
34 Error::ThrottlingException(inner) => inner.fmt(f),
35 Error::ValidationException(inner) => inner.fmt(f),
36 Error::Unhandled(_) => {
37 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
38 write!(f, "unhandled error ({code})")
39 } else {
40 f.write_str("unhandled error")
41 }
42 }
43 }
44 }
45}
46impl From<::aws_smithy_types::error::operation::BuildError> for Error {
47 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
48 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
49 source: value.into(),
50 meta: ::std::default::Default::default(),
51 })
52 }
53}
54impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
55 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
56 match self {
57 Self::AccessDeniedException(inner) => inner.meta(),
58 Self::ConflictException(inner) => inner.meta(),
59 Self::InternalServerException(inner) => inner.meta(),
60 Self::ResourceNotFoundException(inner) => inner.meta(),
61 Self::ThrottlingException(inner) => inner.meta(),
62 Self::ValidationException(inner) => inner.meta(),
63 Self::Unhandled(inner) => &inner.meta,
64 }
65 }
66}
67impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_artifact::AddArtifactError, R>> for Error
68where
69 R: Send + Sync + std::fmt::Debug + 'static,
70{
71 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::add_artifact::AddArtifactError, R>) -> Self {
72 match err {
73 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
74 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
75 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
76 source: err.into(),
77 }),
78 }
79 }
80}
81impl From<crate::operation::add_artifact::AddArtifactError> for Error {
82 fn from(err: crate::operation::add_artifact::AddArtifactError) -> Self {
83 match err {
84 crate::operation::add_artifact::AddArtifactError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
85 crate::operation::add_artifact::AddArtifactError::InternalServerException(inner) => Error::InternalServerException(inner),
86 crate::operation::add_artifact::AddArtifactError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
87 crate::operation::add_artifact::AddArtifactError::ThrottlingException(inner) => Error::ThrottlingException(inner),
88 crate::operation::add_artifact::AddArtifactError::ValidationException(inner) => Error::ValidationException(inner),
89 crate::operation::add_artifact::AddArtifactError::Unhandled(inner) => Error::Unhandled(inner),
90 }
91 }
92}
93impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_delete_pentests::BatchDeletePentestsError, R>> for Error
94where
95 R: Send + Sync + std::fmt::Debug + 'static,
96{
97 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_delete_pentests::BatchDeletePentestsError, R>) -> Self {
98 match err {
99 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
100 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
101 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
102 source: err.into(),
103 }),
104 }
105 }
106}
107impl From<crate::operation::batch_delete_pentests::BatchDeletePentestsError> for Error {
108 fn from(err: crate::operation::batch_delete_pentests::BatchDeletePentestsError) -> Self {
109 match err {
110 crate::operation::batch_delete_pentests::BatchDeletePentestsError::Unhandled(inner) => Error::Unhandled(inner),
111 }
112 }
113}
114impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_agent_spaces::BatchGetAgentSpacesError, 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::batch_get_agent_spaces::BatchGetAgentSpacesError, 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::batch_get_agent_spaces::BatchGetAgentSpacesError> for Error {
129 fn from(err: crate::operation::batch_get_agent_spaces::BatchGetAgentSpacesError) -> Self {
130 match err {
131 crate::operation::batch_get_agent_spaces::BatchGetAgentSpacesError::Unhandled(inner) => Error::Unhandled(inner),
132 }
133 }
134}
135impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError, R>>
136 for Error
137where
138 R: Send + Sync + std::fmt::Debug + 'static,
139{
140 fn from(
141 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError, R>,
142 ) -> Self {
143 match err {
144 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
145 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
146 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
147 source: err.into(),
148 }),
149 }
150 }
151}
152impl From<crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError> for Error {
153 fn from(err: crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError) -> Self {
154 match err {
155 crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError::AccessDeniedException(inner) => {
156 Error::AccessDeniedException(inner)
157 }
158 crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError::InternalServerException(inner) => {
159 Error::InternalServerException(inner)
160 }
161 crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError::ResourceNotFoundException(inner) => {
162 Error::ResourceNotFoundException(inner)
163 }
164 crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError::ThrottlingException(inner) => {
165 Error::ThrottlingException(inner)
166 }
167 crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError::ValidationException(inner) => {
168 Error::ValidationException(inner)
169 }
170 crate::operation::batch_get_artifact_metadata::BatchGetArtifactMetadataError::Unhandled(inner) => Error::Unhandled(inner),
171 }
172 }
173}
174impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_findings::BatchGetFindingsError, R>> for Error
175where
176 R: Send + Sync + std::fmt::Debug + 'static,
177{
178 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_findings::BatchGetFindingsError, R>) -> Self {
179 match err {
180 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
181 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
182 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
183 source: err.into(),
184 }),
185 }
186 }
187}
188impl From<crate::operation::batch_get_findings::BatchGetFindingsError> for Error {
189 fn from(err: crate::operation::batch_get_findings::BatchGetFindingsError) -> Self {
190 match err {
191 crate::operation::batch_get_findings::BatchGetFindingsError::Unhandled(inner) => Error::Unhandled(inner),
192 }
193 }
194}
195impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_pentest_jobs::BatchGetPentestJobsError, R>> for Error
196where
197 R: Send + Sync + std::fmt::Debug + 'static,
198{
199 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_pentest_jobs::BatchGetPentestJobsError, R>) -> Self {
200 match err {
201 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
202 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
203 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
204 source: err.into(),
205 }),
206 }
207 }
208}
209impl From<crate::operation::batch_get_pentest_jobs::BatchGetPentestJobsError> for Error {
210 fn from(err: crate::operation::batch_get_pentest_jobs::BatchGetPentestJobsError) -> Self {
211 match err {
212 crate::operation::batch_get_pentest_jobs::BatchGetPentestJobsError::Unhandled(inner) => Error::Unhandled(inner),
213 }
214 }
215}
216impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_pentest_job_tasks::BatchGetPentestJobTasksError, R>>
217 for Error
218where
219 R: Send + Sync + std::fmt::Debug + 'static,
220{
221 fn from(
222 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_pentest_job_tasks::BatchGetPentestJobTasksError, R>,
223 ) -> Self {
224 match err {
225 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
226 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
227 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
228 source: err.into(),
229 }),
230 }
231 }
232}
233impl From<crate::operation::batch_get_pentest_job_tasks::BatchGetPentestJobTasksError> for Error {
234 fn from(err: crate::operation::batch_get_pentest_job_tasks::BatchGetPentestJobTasksError) -> Self {
235 match err {
236 crate::operation::batch_get_pentest_job_tasks::BatchGetPentestJobTasksError::Unhandled(inner) => Error::Unhandled(inner),
237 }
238 }
239}
240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_pentests::BatchGetPentestsError, R>> for Error
241where
242 R: Send + Sync + std::fmt::Debug + 'static,
243{
244 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_pentests::BatchGetPentestsError, R>) -> Self {
245 match err {
246 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
247 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
248 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
249 source: err.into(),
250 }),
251 }
252 }
253}
254impl From<crate::operation::batch_get_pentests::BatchGetPentestsError> for Error {
255 fn from(err: crate::operation::batch_get_pentests::BatchGetPentestsError) -> Self {
256 match err {
257 crate::operation::batch_get_pentests::BatchGetPentestsError::Unhandled(inner) => Error::Unhandled(inner),
258 }
259 }
260}
261impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_target_domains::BatchGetTargetDomainsError, R>> for Error
262where
263 R: Send + Sync + std::fmt::Debug + 'static,
264{
265 fn from(
266 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_target_domains::BatchGetTargetDomainsError, R>,
267 ) -> Self {
268 match err {
269 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
270 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
271 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
272 source: err.into(),
273 }),
274 }
275 }
276}
277impl From<crate::operation::batch_get_target_domains::BatchGetTargetDomainsError> for Error {
278 fn from(err: crate::operation::batch_get_target_domains::BatchGetTargetDomainsError) -> Self {
279 match err {
280 crate::operation::batch_get_target_domains::BatchGetTargetDomainsError::Unhandled(inner) => Error::Unhandled(inner),
281 }
282 }
283}
284impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_agent_space::CreateAgentSpaceError, R>> for Error
285where
286 R: Send + Sync + std::fmt::Debug + 'static,
287{
288 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_agent_space::CreateAgentSpaceError, R>) -> Self {
289 match err {
290 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
291 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
292 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
293 source: err.into(),
294 }),
295 }
296 }
297}
298impl From<crate::operation::create_agent_space::CreateAgentSpaceError> for Error {
299 fn from(err: crate::operation::create_agent_space::CreateAgentSpaceError) -> Self {
300 match err {
301 crate::operation::create_agent_space::CreateAgentSpaceError::Unhandled(inner) => Error::Unhandled(inner),
302 }
303 }
304}
305impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_application::CreateApplicationError, R>> for Error
306where
307 R: Send + Sync + std::fmt::Debug + 'static,
308{
309 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_application::CreateApplicationError, R>) -> Self {
310 match err {
311 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
312 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
313 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
314 source: err.into(),
315 }),
316 }
317 }
318}
319impl From<crate::operation::create_application::CreateApplicationError> for Error {
320 fn from(err: crate::operation::create_application::CreateApplicationError) -> Self {
321 match err {
322 crate::operation::create_application::CreateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
323 }
324 }
325}
326impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_integration::CreateIntegrationError, R>> for Error
327where
328 R: Send + Sync + std::fmt::Debug + 'static,
329{
330 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_integration::CreateIntegrationError, R>) -> Self {
331 match err {
332 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
333 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
334 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
335 source: err.into(),
336 }),
337 }
338 }
339}
340impl From<crate::operation::create_integration::CreateIntegrationError> for Error {
341 fn from(err: crate::operation::create_integration::CreateIntegrationError) -> Self {
342 match err {
343 crate::operation::create_integration::CreateIntegrationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
344 crate::operation::create_integration::CreateIntegrationError::ConflictException(inner) => Error::ConflictException(inner),
345 crate::operation::create_integration::CreateIntegrationError::InternalServerException(inner) => Error::InternalServerException(inner),
346 crate::operation::create_integration::CreateIntegrationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
347 crate::operation::create_integration::CreateIntegrationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
348 crate::operation::create_integration::CreateIntegrationError::ValidationException(inner) => Error::ValidationException(inner),
349 crate::operation::create_integration::CreateIntegrationError::Unhandled(inner) => Error::Unhandled(inner),
350 }
351 }
352}
353impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_membership::CreateMembershipError, R>> for Error
354where
355 R: Send + Sync + std::fmt::Debug + 'static,
356{
357 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_membership::CreateMembershipError, R>) -> Self {
358 match err {
359 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
360 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
361 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
362 source: err.into(),
363 }),
364 }
365 }
366}
367impl From<crate::operation::create_membership::CreateMembershipError> for Error {
368 fn from(err: crate::operation::create_membership::CreateMembershipError) -> Self {
369 match err {
370 crate::operation::create_membership::CreateMembershipError::Unhandled(inner) => Error::Unhandled(inner),
371 }
372 }
373}
374impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_pentest::CreatePentestError, R>> for Error
375where
376 R: Send + Sync + std::fmt::Debug + 'static,
377{
378 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_pentest::CreatePentestError, R>) -> Self {
379 match err {
380 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
381 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
382 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
383 source: err.into(),
384 }),
385 }
386 }
387}
388impl From<crate::operation::create_pentest::CreatePentestError> for Error {
389 fn from(err: crate::operation::create_pentest::CreatePentestError) -> Self {
390 match err {
391 crate::operation::create_pentest::CreatePentestError::Unhandled(inner) => Error::Unhandled(inner),
392 }
393 }
394}
395impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_target_domain::CreateTargetDomainError, R>> for Error
396where
397 R: Send + Sync + std::fmt::Debug + 'static,
398{
399 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_target_domain::CreateTargetDomainError, R>) -> Self {
400 match err {
401 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
402 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
403 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
404 source: err.into(),
405 }),
406 }
407 }
408}
409impl From<crate::operation::create_target_domain::CreateTargetDomainError> for Error {
410 fn from(err: crate::operation::create_target_domain::CreateTargetDomainError) -> Self {
411 match err {
412 crate::operation::create_target_domain::CreateTargetDomainError::Unhandled(inner) => Error::Unhandled(inner),
413 }
414 }
415}
416impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_space::DeleteAgentSpaceError, R>> for Error
417where
418 R: Send + Sync + std::fmt::Debug + 'static,
419{
420 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_space::DeleteAgentSpaceError, R>) -> Self {
421 match err {
422 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
423 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
424 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
425 source: err.into(),
426 }),
427 }
428 }
429}
430impl From<crate::operation::delete_agent_space::DeleteAgentSpaceError> for Error {
431 fn from(err: crate::operation::delete_agent_space::DeleteAgentSpaceError) -> Self {
432 match err {
433 crate::operation::delete_agent_space::DeleteAgentSpaceError::Unhandled(inner) => Error::Unhandled(inner),
434 }
435 }
436}
437impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_application::DeleteApplicationError, R>> for Error
438where
439 R: Send + Sync + std::fmt::Debug + 'static,
440{
441 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_application::DeleteApplicationError, R>) -> Self {
442 match err {
443 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
444 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
445 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
446 source: err.into(),
447 }),
448 }
449 }
450}
451impl From<crate::operation::delete_application::DeleteApplicationError> for Error {
452 fn from(err: crate::operation::delete_application::DeleteApplicationError) -> Self {
453 match err {
454 crate::operation::delete_application::DeleteApplicationError::Unhandled(inner) => Error::Unhandled(inner),
455 }
456 }
457}
458impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_artifact::DeleteArtifactError, 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::delete_artifact::DeleteArtifactError, 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::delete_artifact::DeleteArtifactError> for Error {
473 fn from(err: crate::operation::delete_artifact::DeleteArtifactError) -> Self {
474 match err {
475 crate::operation::delete_artifact::DeleteArtifactError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
476 crate::operation::delete_artifact::DeleteArtifactError::InternalServerException(inner) => Error::InternalServerException(inner),
477 crate::operation::delete_artifact::DeleteArtifactError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
478 crate::operation::delete_artifact::DeleteArtifactError::ThrottlingException(inner) => Error::ThrottlingException(inner),
479 crate::operation::delete_artifact::DeleteArtifactError::ValidationException(inner) => Error::ValidationException(inner),
480 crate::operation::delete_artifact::DeleteArtifactError::Unhandled(inner) => Error::Unhandled(inner),
481 }
482 }
483}
484impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_integration::DeleteIntegrationError, R>> for Error
485where
486 R: Send + Sync + std::fmt::Debug + 'static,
487{
488 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_integration::DeleteIntegrationError, R>) -> Self {
489 match err {
490 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
491 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
492 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
493 source: err.into(),
494 }),
495 }
496 }
497}
498impl From<crate::operation::delete_integration::DeleteIntegrationError> for Error {
499 fn from(err: crate::operation::delete_integration::DeleteIntegrationError) -> Self {
500 match err {
501 crate::operation::delete_integration::DeleteIntegrationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
502 crate::operation::delete_integration::DeleteIntegrationError::ConflictException(inner) => Error::ConflictException(inner),
503 crate::operation::delete_integration::DeleteIntegrationError::InternalServerException(inner) => Error::InternalServerException(inner),
504 crate::operation::delete_integration::DeleteIntegrationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
505 crate::operation::delete_integration::DeleteIntegrationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
506 crate::operation::delete_integration::DeleteIntegrationError::ValidationException(inner) => Error::ValidationException(inner),
507 crate::operation::delete_integration::DeleteIntegrationError::Unhandled(inner) => Error::Unhandled(inner),
508 }
509 }
510}
511impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_membership::DeleteMembershipError, R>> for Error
512where
513 R: Send + Sync + std::fmt::Debug + 'static,
514{
515 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_membership::DeleteMembershipError, R>) -> Self {
516 match err {
517 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
518 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
519 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
520 source: err.into(),
521 }),
522 }
523 }
524}
525impl From<crate::operation::delete_membership::DeleteMembershipError> for Error {
526 fn from(err: crate::operation::delete_membership::DeleteMembershipError) -> Self {
527 match err {
528 crate::operation::delete_membership::DeleteMembershipError::Unhandled(inner) => Error::Unhandled(inner),
529 }
530 }
531}
532impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_target_domain::DeleteTargetDomainError, R>> for Error
533where
534 R: Send + Sync + std::fmt::Debug + 'static,
535{
536 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_target_domain::DeleteTargetDomainError, R>) -> Self {
537 match err {
538 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
539 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
540 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
541 source: err.into(),
542 }),
543 }
544 }
545}
546impl From<crate::operation::delete_target_domain::DeleteTargetDomainError> for Error {
547 fn from(err: crate::operation::delete_target_domain::DeleteTargetDomainError) -> Self {
548 match err {
549 crate::operation::delete_target_domain::DeleteTargetDomainError::Unhandled(inner) => Error::Unhandled(inner),
550 }
551 }
552}
553impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>> for Error
554where
555 R: Send + Sync + std::fmt::Debug + 'static,
556{
557 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_application::GetApplicationError, R>) -> Self {
558 match err {
559 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
560 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
561 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
562 source: err.into(),
563 }),
564 }
565 }
566}
567impl From<crate::operation::get_application::GetApplicationError> for Error {
568 fn from(err: crate::operation::get_application::GetApplicationError) -> Self {
569 match err {
570 crate::operation::get_application::GetApplicationError::Unhandled(inner) => Error::Unhandled(inner),
571 }
572 }
573}
574impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_artifact::GetArtifactError, R>> for Error
575where
576 R: Send + Sync + std::fmt::Debug + 'static,
577{
578 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_artifact::GetArtifactError, R>) -> Self {
579 match err {
580 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
581 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
582 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
583 source: err.into(),
584 }),
585 }
586 }
587}
588impl From<crate::operation::get_artifact::GetArtifactError> for Error {
589 fn from(err: crate::operation::get_artifact::GetArtifactError) -> Self {
590 match err {
591 crate::operation::get_artifact::GetArtifactError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
592 crate::operation::get_artifact::GetArtifactError::InternalServerException(inner) => Error::InternalServerException(inner),
593 crate::operation::get_artifact::GetArtifactError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
594 crate::operation::get_artifact::GetArtifactError::ThrottlingException(inner) => Error::ThrottlingException(inner),
595 crate::operation::get_artifact::GetArtifactError::ValidationException(inner) => Error::ValidationException(inner),
596 crate::operation::get_artifact::GetArtifactError::Unhandled(inner) => Error::Unhandled(inner),
597 }
598 }
599}
600impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_integration::GetIntegrationError, R>> for Error
601where
602 R: Send + Sync + std::fmt::Debug + 'static,
603{
604 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_integration::GetIntegrationError, R>) -> Self {
605 match err {
606 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
607 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
608 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
609 source: err.into(),
610 }),
611 }
612 }
613}
614impl From<crate::operation::get_integration::GetIntegrationError> for Error {
615 fn from(err: crate::operation::get_integration::GetIntegrationError) -> Self {
616 match err {
617 crate::operation::get_integration::GetIntegrationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
618 crate::operation::get_integration::GetIntegrationError::InternalServerException(inner) => Error::InternalServerException(inner),
619 crate::operation::get_integration::GetIntegrationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
620 crate::operation::get_integration::GetIntegrationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
621 crate::operation::get_integration::GetIntegrationError::ValidationException(inner) => Error::ValidationException(inner),
622 crate::operation::get_integration::GetIntegrationError::Unhandled(inner) => Error::Unhandled(inner),
623 }
624 }
625}
626impl<R>
627 From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::initiate_provider_registration::InitiateProviderRegistrationError, R>>
628 for Error
629where
630 R: Send + Sync + std::fmt::Debug + 'static,
631{
632 fn from(
633 err: ::aws_smithy_runtime_api::client::result::SdkError<
634 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError,
635 R,
636 >,
637 ) -> Self {
638 match err {
639 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
640 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
641 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
642 source: err.into(),
643 }),
644 }
645 }
646}
647impl From<crate::operation::initiate_provider_registration::InitiateProviderRegistrationError> for Error {
648 fn from(err: crate::operation::initiate_provider_registration::InitiateProviderRegistrationError) -> Self {
649 match err {
650 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError::AccessDeniedException(inner) => {
651 Error::AccessDeniedException(inner)
652 }
653 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError::ConflictException(inner) => {
654 Error::ConflictException(inner)
655 }
656 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError::InternalServerException(inner) => {
657 Error::InternalServerException(inner)
658 }
659 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError::ResourceNotFoundException(inner) => {
660 Error::ResourceNotFoundException(inner)
661 }
662 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError::ThrottlingException(inner) => {
663 Error::ThrottlingException(inner)
664 }
665 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError::ValidationException(inner) => {
666 Error::ValidationException(inner)
667 }
668 crate::operation::initiate_provider_registration::InitiateProviderRegistrationError::Unhandled(inner) => Error::Unhandled(inner),
669 }
670 }
671}
672impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_agent_spaces::ListAgentSpacesError, R>> for Error
673where
674 R: Send + Sync + std::fmt::Debug + 'static,
675{
676 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_agent_spaces::ListAgentSpacesError, R>) -> Self {
677 match err {
678 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
679 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
680 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
681 source: err.into(),
682 }),
683 }
684 }
685}
686impl From<crate::operation::list_agent_spaces::ListAgentSpacesError> for Error {
687 fn from(err: crate::operation::list_agent_spaces::ListAgentSpacesError) -> Self {
688 match err {
689 crate::operation::list_agent_spaces::ListAgentSpacesError::Unhandled(inner) => Error::Unhandled(inner),
690 }
691 }
692}
693impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_applications::ListApplicationsError, 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::list_applications::ListApplicationsError, 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::list_applications::ListApplicationsError> for Error {
708 fn from(err: crate::operation::list_applications::ListApplicationsError) -> Self {
709 match err {
710 crate::operation::list_applications::ListApplicationsError::Unhandled(inner) => Error::Unhandled(inner),
711 }
712 }
713}
714impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_artifacts::ListArtifactsError, R>> for Error
715where
716 R: Send + Sync + std::fmt::Debug + 'static,
717{
718 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_artifacts::ListArtifactsError, R>) -> Self {
719 match err {
720 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
721 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
722 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
723 source: err.into(),
724 }),
725 }
726 }
727}
728impl From<crate::operation::list_artifacts::ListArtifactsError> for Error {
729 fn from(err: crate::operation::list_artifacts::ListArtifactsError) -> Self {
730 match err {
731 crate::operation::list_artifacts::ListArtifactsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
732 crate::operation::list_artifacts::ListArtifactsError::InternalServerException(inner) => Error::InternalServerException(inner),
733 crate::operation::list_artifacts::ListArtifactsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
734 crate::operation::list_artifacts::ListArtifactsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
735 crate::operation::list_artifacts::ListArtifactsError::ValidationException(inner) => Error::ValidationException(inner),
736 crate::operation::list_artifacts::ListArtifactsError::Unhandled(inner) => Error::Unhandled(inner),
737 }
738 }
739}
740impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_discovered_endpoints::ListDiscoveredEndpointsError, R>>
741 for Error
742where
743 R: Send + Sync + std::fmt::Debug + 'static,
744{
745 fn from(
746 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_discovered_endpoints::ListDiscoveredEndpointsError, R>,
747 ) -> Self {
748 match err {
749 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
750 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
751 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
752 source: err.into(),
753 }),
754 }
755 }
756}
757impl From<crate::operation::list_discovered_endpoints::ListDiscoveredEndpointsError> for Error {
758 fn from(err: crate::operation::list_discovered_endpoints::ListDiscoveredEndpointsError) -> Self {
759 match err {
760 crate::operation::list_discovered_endpoints::ListDiscoveredEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
761 }
762 }
763}
764impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>> for Error
765where
766 R: Send + Sync + std::fmt::Debug + 'static,
767{
768 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_findings::ListFindingsError, R>) -> Self {
769 match err {
770 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
771 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
772 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
773 source: err.into(),
774 }),
775 }
776 }
777}
778impl From<crate::operation::list_findings::ListFindingsError> for Error {
779 fn from(err: crate::operation::list_findings::ListFindingsError) -> Self {
780 match err {
781 crate::operation::list_findings::ListFindingsError::Unhandled(inner) => Error::Unhandled(inner),
782 }
783 }
784}
785impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_integrated_resources::ListIntegratedResourcesError, R>>
786 for Error
787where
788 R: Send + Sync + std::fmt::Debug + 'static,
789{
790 fn from(
791 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_integrated_resources::ListIntegratedResourcesError, R>,
792 ) -> Self {
793 match err {
794 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
795 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
796 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
797 source: err.into(),
798 }),
799 }
800 }
801}
802impl From<crate::operation::list_integrated_resources::ListIntegratedResourcesError> for Error {
803 fn from(err: crate::operation::list_integrated_resources::ListIntegratedResourcesError) -> Self {
804 match err {
805 crate::operation::list_integrated_resources::ListIntegratedResourcesError::AccessDeniedException(inner) => {
806 Error::AccessDeniedException(inner)
807 }
808 crate::operation::list_integrated_resources::ListIntegratedResourcesError::InternalServerException(inner) => {
809 Error::InternalServerException(inner)
810 }
811 crate::operation::list_integrated_resources::ListIntegratedResourcesError::ResourceNotFoundException(inner) => {
812 Error::ResourceNotFoundException(inner)
813 }
814 crate::operation::list_integrated_resources::ListIntegratedResourcesError::ThrottlingException(inner) => {
815 Error::ThrottlingException(inner)
816 }
817 crate::operation::list_integrated_resources::ListIntegratedResourcesError::ValidationException(inner) => {
818 Error::ValidationException(inner)
819 }
820 crate::operation::list_integrated_resources::ListIntegratedResourcesError::Unhandled(inner) => Error::Unhandled(inner),
821 }
822 }
823}
824impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_integrations::ListIntegrationsError, R>> for Error
825where
826 R: Send + Sync + std::fmt::Debug + 'static,
827{
828 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_integrations::ListIntegrationsError, R>) -> Self {
829 match err {
830 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
831 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
832 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
833 source: err.into(),
834 }),
835 }
836 }
837}
838impl From<crate::operation::list_integrations::ListIntegrationsError> for Error {
839 fn from(err: crate::operation::list_integrations::ListIntegrationsError) -> Self {
840 match err {
841 crate::operation::list_integrations::ListIntegrationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
842 crate::operation::list_integrations::ListIntegrationsError::InternalServerException(inner) => Error::InternalServerException(inner),
843 crate::operation::list_integrations::ListIntegrationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
844 crate::operation::list_integrations::ListIntegrationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
845 crate::operation::list_integrations::ListIntegrationsError::ValidationException(inner) => Error::ValidationException(inner),
846 crate::operation::list_integrations::ListIntegrationsError::Unhandled(inner) => Error::Unhandled(inner),
847 }
848 }
849}
850impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_memberships::ListMembershipsError, R>> for Error
851where
852 R: Send + Sync + std::fmt::Debug + 'static,
853{
854 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_memberships::ListMembershipsError, R>) -> Self {
855 match err {
856 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
857 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
858 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
859 source: err.into(),
860 }),
861 }
862 }
863}
864impl From<crate::operation::list_memberships::ListMembershipsError> for Error {
865 fn from(err: crate::operation::list_memberships::ListMembershipsError) -> Self {
866 match err {
867 crate::operation::list_memberships::ListMembershipsError::Unhandled(inner) => Error::Unhandled(inner),
868 }
869 }
870}
871impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pentest_jobs_for_pentest::ListPentestJobsForPentestError, R>>
872 for Error
873where
874 R: Send + Sync + std::fmt::Debug + 'static,
875{
876 fn from(
877 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pentest_jobs_for_pentest::ListPentestJobsForPentestError, R>,
878 ) -> Self {
879 match err {
880 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
881 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
882 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
883 source: err.into(),
884 }),
885 }
886 }
887}
888impl From<crate::operation::list_pentest_jobs_for_pentest::ListPentestJobsForPentestError> for Error {
889 fn from(err: crate::operation::list_pentest_jobs_for_pentest::ListPentestJobsForPentestError) -> Self {
890 match err {
891 crate::operation::list_pentest_jobs_for_pentest::ListPentestJobsForPentestError::Unhandled(inner) => Error::Unhandled(inner),
892 }
893 }
894}
895impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pentest_job_tasks::ListPentestJobTasksError, R>> for Error
896where
897 R: Send + Sync + std::fmt::Debug + 'static,
898{
899 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pentest_job_tasks::ListPentestJobTasksError, R>) -> Self {
900 match err {
901 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
902 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
903 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
904 source: err.into(),
905 }),
906 }
907 }
908}
909impl From<crate::operation::list_pentest_job_tasks::ListPentestJobTasksError> for Error {
910 fn from(err: crate::operation::list_pentest_job_tasks::ListPentestJobTasksError) -> Self {
911 match err {
912 crate::operation::list_pentest_job_tasks::ListPentestJobTasksError::Unhandled(inner) => Error::Unhandled(inner),
913 }
914 }
915}
916impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pentests::ListPentestsError, R>> for Error
917where
918 R: Send + Sync + std::fmt::Debug + 'static,
919{
920 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pentests::ListPentestsError, R>) -> Self {
921 match err {
922 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
923 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
924 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
925 source: err.into(),
926 }),
927 }
928 }
929}
930impl From<crate::operation::list_pentests::ListPentestsError> for Error {
931 fn from(err: crate::operation::list_pentests::ListPentestsError) -> Self {
932 match err {
933 crate::operation::list_pentests::ListPentestsError::Unhandled(inner) => Error::Unhandled(inner),
934 }
935 }
936}
937impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
938where
939 R: Send + Sync + std::fmt::Debug + 'static,
940{
941 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
942 match err {
943 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
944 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
945 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
946 source: err.into(),
947 }),
948 }
949 }
950}
951impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
952 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
953 match err {
954 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
955 }
956 }
957}
958impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_target_domains::ListTargetDomainsError, R>> for Error
959where
960 R: Send + Sync + std::fmt::Debug + 'static,
961{
962 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_target_domains::ListTargetDomainsError, R>) -> Self {
963 match err {
964 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
965 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
966 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
967 source: err.into(),
968 }),
969 }
970 }
971}
972impl From<crate::operation::list_target_domains::ListTargetDomainsError> for Error {
973 fn from(err: crate::operation::list_target_domains::ListTargetDomainsError) -> Self {
974 match err {
975 crate::operation::list_target_domains::ListTargetDomainsError::Unhandled(inner) => Error::Unhandled(inner),
976 }
977 }
978}
979impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_code_remediation::StartCodeRemediationError, R>> for Error
980where
981 R: Send + Sync + std::fmt::Debug + 'static,
982{
983 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_code_remediation::StartCodeRemediationError, R>) -> Self {
984 match err {
985 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
986 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
987 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
988 source: err.into(),
989 }),
990 }
991 }
992}
993impl From<crate::operation::start_code_remediation::StartCodeRemediationError> for Error {
994 fn from(err: crate::operation::start_code_remediation::StartCodeRemediationError) -> Self {
995 match err {
996 crate::operation::start_code_remediation::StartCodeRemediationError::Unhandled(inner) => Error::Unhandled(inner),
997 }
998 }
999}
1000impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_pentest_job::StartPentestJobError, R>> for Error
1001where
1002 R: Send + Sync + std::fmt::Debug + 'static,
1003{
1004 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_pentest_job::StartPentestJobError, R>) -> Self {
1005 match err {
1006 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1007 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1008 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1009 source: err.into(),
1010 }),
1011 }
1012 }
1013}
1014impl From<crate::operation::start_pentest_job::StartPentestJobError> for Error {
1015 fn from(err: crate::operation::start_pentest_job::StartPentestJobError) -> Self {
1016 match err {
1017 crate::operation::start_pentest_job::StartPentestJobError::Unhandled(inner) => Error::Unhandled(inner),
1018 }
1019 }
1020}
1021impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_pentest_job::StopPentestJobError, R>> for Error
1022where
1023 R: Send + Sync + std::fmt::Debug + 'static,
1024{
1025 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_pentest_job::StopPentestJobError, R>) -> Self {
1026 match err {
1027 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1028 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1029 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1030 source: err.into(),
1031 }),
1032 }
1033 }
1034}
1035impl From<crate::operation::stop_pentest_job::StopPentestJobError> for Error {
1036 fn from(err: crate::operation::stop_pentest_job::StopPentestJobError) -> Self {
1037 match err {
1038 crate::operation::stop_pentest_job::StopPentestJobError::Unhandled(inner) => Error::Unhandled(inner),
1039 }
1040 }
1041}
1042impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1043where
1044 R: Send + Sync + std::fmt::Debug + 'static,
1045{
1046 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1047 match err {
1048 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1049 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1050 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1051 source: err.into(),
1052 }),
1053 }
1054 }
1055}
1056impl From<crate::operation::tag_resource::TagResourceError> for Error {
1057 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1058 match err {
1059 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1060 }
1061 }
1062}
1063impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1064where
1065 R: Send + Sync + std::fmt::Debug + 'static,
1066{
1067 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1068 match err {
1069 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1070 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1071 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1072 source: err.into(),
1073 }),
1074 }
1075 }
1076}
1077impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1078 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1079 match err {
1080 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1081 }
1082 }
1083}
1084impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_agent_space::UpdateAgentSpaceError, R>> for Error
1085where
1086 R: Send + Sync + std::fmt::Debug + 'static,
1087{
1088 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_agent_space::UpdateAgentSpaceError, R>) -> Self {
1089 match err {
1090 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1091 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1092 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1093 source: err.into(),
1094 }),
1095 }
1096 }
1097}
1098impl From<crate::operation::update_agent_space::UpdateAgentSpaceError> for Error {
1099 fn from(err: crate::operation::update_agent_space::UpdateAgentSpaceError) -> Self {
1100 match err {
1101 crate::operation::update_agent_space::UpdateAgentSpaceError::Unhandled(inner) => Error::Unhandled(inner),
1102 }
1103 }
1104}
1105impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application::UpdateApplicationError, R>> for Error
1106where
1107 R: Send + Sync + std::fmt::Debug + 'static,
1108{
1109 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_application::UpdateApplicationError, R>) -> Self {
1110 match err {
1111 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1112 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1113 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1114 source: err.into(),
1115 }),
1116 }
1117 }
1118}
1119impl From<crate::operation::update_application::UpdateApplicationError> for Error {
1120 fn from(err: crate::operation::update_application::UpdateApplicationError) -> Self {
1121 match err {
1122 crate::operation::update_application::UpdateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
1123 }
1124 }
1125}
1126impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_finding::UpdateFindingError, R>> for Error
1127where
1128 R: Send + Sync + std::fmt::Debug + 'static,
1129{
1130 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_finding::UpdateFindingError, R>) -> Self {
1131 match err {
1132 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1133 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1134 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1135 source: err.into(),
1136 }),
1137 }
1138 }
1139}
1140impl From<crate::operation::update_finding::UpdateFindingError> for Error {
1141 fn from(err: crate::operation::update_finding::UpdateFindingError) -> Self {
1142 match err {
1143 crate::operation::update_finding::UpdateFindingError::Unhandled(inner) => Error::Unhandled(inner),
1144 }
1145 }
1146}
1147impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_integrated_resources::UpdateIntegratedResourcesError, R>>
1148 for Error
1149where
1150 R: Send + Sync + std::fmt::Debug + 'static,
1151{
1152 fn from(
1153 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_integrated_resources::UpdateIntegratedResourcesError, R>,
1154 ) -> Self {
1155 match err {
1156 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1157 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1158 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1159 source: err.into(),
1160 }),
1161 }
1162 }
1163}
1164impl From<crate::operation::update_integrated_resources::UpdateIntegratedResourcesError> for Error {
1165 fn from(err: crate::operation::update_integrated_resources::UpdateIntegratedResourcesError) -> Self {
1166 match err {
1167 crate::operation::update_integrated_resources::UpdateIntegratedResourcesError::AccessDeniedException(inner) => {
1168 Error::AccessDeniedException(inner)
1169 }
1170 crate::operation::update_integrated_resources::UpdateIntegratedResourcesError::ConflictException(inner) => {
1171 Error::ConflictException(inner)
1172 }
1173 crate::operation::update_integrated_resources::UpdateIntegratedResourcesError::InternalServerException(inner) => {
1174 Error::InternalServerException(inner)
1175 }
1176 crate::operation::update_integrated_resources::UpdateIntegratedResourcesError::ResourceNotFoundException(inner) => {
1177 Error::ResourceNotFoundException(inner)
1178 }
1179 crate::operation::update_integrated_resources::UpdateIntegratedResourcesError::ThrottlingException(inner) => {
1180 Error::ThrottlingException(inner)
1181 }
1182 crate::operation::update_integrated_resources::UpdateIntegratedResourcesError::ValidationException(inner) => {
1183 Error::ValidationException(inner)
1184 }
1185 crate::operation::update_integrated_resources::UpdateIntegratedResourcesError::Unhandled(inner) => Error::Unhandled(inner),
1186 }
1187 }
1188}
1189impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_pentest::UpdatePentestError, R>> for Error
1190where
1191 R: Send + Sync + std::fmt::Debug + 'static,
1192{
1193 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_pentest::UpdatePentestError, R>) -> Self {
1194 match err {
1195 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1196 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1197 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1198 source: err.into(),
1199 }),
1200 }
1201 }
1202}
1203impl From<crate::operation::update_pentest::UpdatePentestError> for Error {
1204 fn from(err: crate::operation::update_pentest::UpdatePentestError) -> Self {
1205 match err {
1206 crate::operation::update_pentest::UpdatePentestError::Unhandled(inner) => Error::Unhandled(inner),
1207 }
1208 }
1209}
1210impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_target_domain::UpdateTargetDomainError, R>> for Error
1211where
1212 R: Send + Sync + std::fmt::Debug + 'static,
1213{
1214 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_target_domain::UpdateTargetDomainError, R>) -> Self {
1215 match err {
1216 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1217 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1218 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1219 source: err.into(),
1220 }),
1221 }
1222 }
1223}
1224impl From<crate::operation::update_target_domain::UpdateTargetDomainError> for Error {
1225 fn from(err: crate::operation::update_target_domain::UpdateTargetDomainError) -> Self {
1226 match err {
1227 crate::operation::update_target_domain::UpdateTargetDomainError::Unhandled(inner) => Error::Unhandled(inner),
1228 }
1229 }
1230}
1231impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::verify_target_domain::VerifyTargetDomainError, R>> for Error
1232where
1233 R: Send + Sync + std::fmt::Debug + 'static,
1234{
1235 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::verify_target_domain::VerifyTargetDomainError, R>) -> Self {
1236 match err {
1237 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1238 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1239 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1240 source: err.into(),
1241 }),
1242 }
1243 }
1244}
1245impl From<crate::operation::verify_target_domain::VerifyTargetDomainError> for Error {
1246 fn from(err: crate::operation::verify_target_domain::VerifyTargetDomainError) -> Self {
1247 match err {
1248 crate::operation::verify_target_domain::VerifyTargetDomainError::Unhandled(inner) => Error::Unhandled(inner),
1249 }
1250 }
1251}
1252impl ::std::error::Error for Error {
1253 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1254 match self {
1255 Error::AccessDeniedException(inner) => inner.source(),
1256 Error::ConflictException(inner) => inner.source(),
1257 Error::InternalServerException(inner) => inner.source(),
1258 Error::ResourceNotFoundException(inner) => inner.source(),
1259 Error::ThrottlingException(inner) => inner.source(),
1260 Error::ValidationException(inner) => inner.source(),
1261 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1262 }
1263 }
1264}
1265impl ::aws_types::request_id::RequestId for Error {
1266 fn request_id(&self) -> Option<&str> {
1267 match self {
1268 Self::AccessDeniedException(e) => e.request_id(),
1269 Self::ConflictException(e) => e.request_id(),
1270 Self::InternalServerException(e) => e.request_id(),
1271 Self::ResourceNotFoundException(e) => e.request_id(),
1272 Self::ThrottlingException(e) => e.request_id(),
1273 Self::ValidationException(e) => e.request_id(),
1274 Self::Unhandled(e) => e.meta.request_id(),
1275 }
1276 }
1277}