1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 BadGatewayException(crate::types::error::BadGatewayException),
10 ConflictException(crate::types::error::ConflictException),
12 DependencyFailedException(crate::types::error::DependencyFailedException),
14 InternalServerException(crate::types::error::InternalServerException),
16 ModelNotReadyException(crate::types::error::ModelNotReadyException),
18 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
20 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
22 ThrottlingException(crate::types::error::ThrottlingException),
24 ValidationException(crate::types::error::ValidationException),
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::AccessDeniedException(inner) => inner.fmt(f),
39 Error::BadGatewayException(inner) => inner.fmt(f),
40 Error::ConflictException(inner) => inner.fmt(f),
41 Error::DependencyFailedException(inner) => inner.fmt(f),
42 Error::InternalServerException(inner) => inner.fmt(f),
43 Error::ModelNotReadyException(inner) => inner.fmt(f),
44 Error::ResourceNotFoundException(inner) => inner.fmt(f),
45 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
46 Error::ThrottlingException(inner) => inner.fmt(f),
47 Error::ValidationException(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::AccessDeniedException(inner) => inner.meta(),
70 Self::BadGatewayException(inner) => inner.meta(),
71 Self::ConflictException(inner) => inner.meta(),
72 Self::DependencyFailedException(inner) => inner.meta(),
73 Self::InternalServerException(inner) => inner.meta(),
74 Self::ModelNotReadyException(inner) => inner.meta(),
75 Self::ResourceNotFoundException(inner) => inner.meta(),
76 Self::ServiceQuotaExceededException(inner) => inner.meta(),
77 Self::ThrottlingException(inner) => inner.meta(),
78 Self::ValidationException(inner) => inner.meta(),
79 Self::Unhandled(inner) => &inner.meta,
80 }
81 }
82}
83impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError, R>> for Error
84where
85 R: Send + Sync + std::fmt::Debug + 'static,
86{
87 fn from(
88 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError, R>,
89 ) -> Self {
90 match err {
91 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
92 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
93 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
94 source: err.into(),
95 }),
96 }
97 }
98}
99impl From<crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError> for Error {
100 fn from(err: crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError) -> Self {
101 match err {
102 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::AccessDeniedException(inner) => {
103 Error::AccessDeniedException(inner)
104 }
105 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
106 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ConflictException(inner) => Error::ConflictException(inner),
107 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::DependencyFailedException(inner) => {
108 Error::DependencyFailedException(inner)
109 }
110 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::InternalServerException(inner) => {
111 Error::InternalServerException(inner)
112 }
113 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ResourceNotFoundException(inner) => {
114 Error::ResourceNotFoundException(inner)
115 }
116 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ServiceQuotaExceededException(inner) => {
117 Error::ServiceQuotaExceededException(inner)
118 }
119 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
120 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ValidationException(inner) => Error::ValidationException(inner),
121 crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::Unhandled(inner) => Error::Unhandled(inner),
122 }
123 }
124}
125impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_invocation::CreateInvocationError, R>> for Error
126where
127 R: Send + Sync + std::fmt::Debug + 'static,
128{
129 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_invocation::CreateInvocationError, R>) -> Self {
130 match err {
131 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
132 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
133 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
134 source: err.into(),
135 }),
136 }
137 }
138}
139impl From<crate::operation::create_invocation::CreateInvocationError> for Error {
140 fn from(err: crate::operation::create_invocation::CreateInvocationError) -> Self {
141 match err {
142 crate::operation::create_invocation::CreateInvocationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
143 crate::operation::create_invocation::CreateInvocationError::ConflictException(inner) => Error::ConflictException(inner),
144 crate::operation::create_invocation::CreateInvocationError::InternalServerException(inner) => Error::InternalServerException(inner),
145 crate::operation::create_invocation::CreateInvocationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
146 crate::operation::create_invocation::CreateInvocationError::ServiceQuotaExceededException(inner) => {
147 Error::ServiceQuotaExceededException(inner)
148 }
149 crate::operation::create_invocation::CreateInvocationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
150 crate::operation::create_invocation::CreateInvocationError::ValidationException(inner) => Error::ValidationException(inner),
151 crate::operation::create_invocation::CreateInvocationError::Unhandled(inner) => Error::Unhandled(inner),
152 }
153 }
154}
155impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>> for Error
156where
157 R: Send + Sync + std::fmt::Debug + 'static,
158{
159 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>) -> Self {
160 match err {
161 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
162 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
163 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
164 source: err.into(),
165 }),
166 }
167 }
168}
169impl From<crate::operation::create_session::CreateSessionError> for Error {
170 fn from(err: crate::operation::create_session::CreateSessionError) -> Self {
171 match err {
172 crate::operation::create_session::CreateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
173 crate::operation::create_session::CreateSessionError::ConflictException(inner) => Error::ConflictException(inner),
174 crate::operation::create_session::CreateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
175 crate::operation::create_session::CreateSessionError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
176 crate::operation::create_session::CreateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
177 crate::operation::create_session::CreateSessionError::ValidationException(inner) => Error::ValidationException(inner),
178 crate::operation::create_session::CreateSessionError::Unhandled(inner) => Error::Unhandled(inner),
179 }
180 }
181}
182impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>> for Error
183where
184 R: Send + Sync + std::fmt::Debug + 'static,
185{
186 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>) -> Self {
187 match err {
188 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
189 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
190 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
191 source: err.into(),
192 }),
193 }
194 }
195}
196impl From<crate::operation::delete_agent_memory::DeleteAgentMemoryError> for Error {
197 fn from(err: crate::operation::delete_agent_memory::DeleteAgentMemoryError) -> Self {
198 match err {
199 crate::operation::delete_agent_memory::DeleteAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
200 crate::operation::delete_agent_memory::DeleteAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
201 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
202 crate::operation::delete_agent_memory::DeleteAgentMemoryError::DependencyFailedException(inner) => {
203 Error::DependencyFailedException(inner)
204 }
205 crate::operation::delete_agent_memory::DeleteAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
206 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ResourceNotFoundException(inner) => {
207 Error::ResourceNotFoundException(inner)
208 }
209 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ServiceQuotaExceededException(inner) => {
210 Error::ServiceQuotaExceededException(inner)
211 }
212 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
213 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
214 crate::operation::delete_agent_memory::DeleteAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
215 }
216 }
217}
218impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>> for Error
219where
220 R: Send + Sync + std::fmt::Debug + 'static,
221{
222 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>) -> Self {
223 match err {
224 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
225 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
226 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
227 source: err.into(),
228 }),
229 }
230 }
231}
232impl From<crate::operation::delete_session::DeleteSessionError> for Error {
233 fn from(err: crate::operation::delete_session::DeleteSessionError) -> Self {
234 match err {
235 crate::operation::delete_session::DeleteSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
236 crate::operation::delete_session::DeleteSessionError::ConflictException(inner) => Error::ConflictException(inner),
237 crate::operation::delete_session::DeleteSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
238 crate::operation::delete_session::DeleteSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
239 crate::operation::delete_session::DeleteSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
240 crate::operation::delete_session::DeleteSessionError::ValidationException(inner) => Error::ValidationException(inner),
241 crate::operation::delete_session::DeleteSessionError::Unhandled(inner) => Error::Unhandled(inner),
242 }
243 }
244}
245impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>> for Error
246where
247 R: Send + Sync + std::fmt::Debug + 'static,
248{
249 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>) -> Self {
250 match err {
251 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
252 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
253 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
254 source: err.into(),
255 }),
256 }
257 }
258}
259impl From<crate::operation::end_session::EndSessionError> for Error {
260 fn from(err: crate::operation::end_session::EndSessionError) -> Self {
261 match err {
262 crate::operation::end_session::EndSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
263 crate::operation::end_session::EndSessionError::ConflictException(inner) => Error::ConflictException(inner),
264 crate::operation::end_session::EndSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
265 crate::operation::end_session::EndSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
266 crate::operation::end_session::EndSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
267 crate::operation::end_session::EndSessionError::ValidationException(inner) => Error::ValidationException(inner),
268 crate::operation::end_session::EndSessionError::Unhandled(inner) => Error::Unhandled(inner),
269 }
270 }
271}
272impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>> for Error
273where
274 R: Send + Sync + std::fmt::Debug + 'static,
275{
276 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>) -> Self {
277 match err {
278 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
279 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
280 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
281 source: err.into(),
282 }),
283 }
284 }
285}
286impl From<crate::operation::generate_query::GenerateQueryError> for Error {
287 fn from(err: crate::operation::generate_query::GenerateQueryError) -> Self {
288 match err {
289 crate::operation::generate_query::GenerateQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
290 crate::operation::generate_query::GenerateQueryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
291 crate::operation::generate_query::GenerateQueryError::ConflictException(inner) => Error::ConflictException(inner),
292 crate::operation::generate_query::GenerateQueryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
293 crate::operation::generate_query::GenerateQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
294 crate::operation::generate_query::GenerateQueryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
295 crate::operation::generate_query::GenerateQueryError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
296 crate::operation::generate_query::GenerateQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
297 crate::operation::generate_query::GenerateQueryError::ValidationException(inner) => Error::ValidationException(inner),
298 crate::operation::generate_query::GenerateQueryError::Unhandled(inner) => Error::Unhandled(inner),
299 }
300 }
301}
302impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>> for Error
303where
304 R: Send + Sync + std::fmt::Debug + 'static,
305{
306 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>) -> Self {
307 match err {
308 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
309 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
310 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
311 source: err.into(),
312 }),
313 }
314 }
315}
316impl From<crate::operation::get_agent_memory::GetAgentMemoryError> for Error {
317 fn from(err: crate::operation::get_agent_memory::GetAgentMemoryError) -> Self {
318 match err {
319 crate::operation::get_agent_memory::GetAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
320 crate::operation::get_agent_memory::GetAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
321 crate::operation::get_agent_memory::GetAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
322 crate::operation::get_agent_memory::GetAgentMemoryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
323 crate::operation::get_agent_memory::GetAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
324 crate::operation::get_agent_memory::GetAgentMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
325 crate::operation::get_agent_memory::GetAgentMemoryError::ServiceQuotaExceededException(inner) => {
326 Error::ServiceQuotaExceededException(inner)
327 }
328 crate::operation::get_agent_memory::GetAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
329 crate::operation::get_agent_memory::GetAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
330 crate::operation::get_agent_memory::GetAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
331 }
332 }
333}
334impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_document_content::GetDocumentContentError, R>> for Error
335where
336 R: Send + Sync + std::fmt::Debug + 'static,
337{
338 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_document_content::GetDocumentContentError, R>) -> Self {
339 match err {
340 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
341 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
342 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
343 source: err.into(),
344 }),
345 }
346 }
347}
348impl From<crate::operation::get_document_content::GetDocumentContentError> for Error {
349 fn from(err: crate::operation::get_document_content::GetDocumentContentError) -> Self {
350 match err {
351 crate::operation::get_document_content::GetDocumentContentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
352 crate::operation::get_document_content::GetDocumentContentError::InternalServerException(inner) => Error::InternalServerException(inner),
353 crate::operation::get_document_content::GetDocumentContentError::ResourceNotFoundException(inner) => {
354 Error::ResourceNotFoundException(inner)
355 }
356 crate::operation::get_document_content::GetDocumentContentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
357 crate::operation::get_document_content::GetDocumentContentError::ValidationException(inner) => Error::ValidationException(inner),
358 crate::operation::get_document_content::GetDocumentContentError::Unhandled(inner) => Error::Unhandled(inner),
359 }
360 }
361}
362impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError, R>>
363 for Error
364where
365 R: Send + Sync + std::fmt::Debug + 'static,
366{
367 fn from(
368 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError, R>,
369 ) -> Self {
370 match err {
371 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
372 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
373 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
374 source: err.into(),
375 }),
376 }
377 }
378}
379impl From<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError> for Error {
380 fn from(err: crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError) -> Self {
381 match err {
382 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::AccessDeniedException(inner) => {
383 Error::AccessDeniedException(inner)
384 }
385 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::InternalServerException(inner) => {
386 Error::InternalServerException(inner)
387 }
388 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ResourceNotFoundException(inner) => {
389 Error::ResourceNotFoundException(inner)
390 }
391 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ThrottlingException(inner) => {
392 Error::ThrottlingException(inner)
393 }
394 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ValidationException(inner) => {
395 Error::ValidationException(inner)
396 }
397 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
398 }
399 }
400}
401impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_flow_execution::GetFlowExecutionError, R>> for Error
402where
403 R: Send + Sync + std::fmt::Debug + 'static,
404{
405 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_flow_execution::GetFlowExecutionError, R>) -> Self {
406 match err {
407 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
408 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
409 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
410 source: err.into(),
411 }),
412 }
413 }
414}
415impl From<crate::operation::get_flow_execution::GetFlowExecutionError> for Error {
416 fn from(err: crate::operation::get_flow_execution::GetFlowExecutionError) -> Self {
417 match err {
418 crate::operation::get_flow_execution::GetFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
419 crate::operation::get_flow_execution::GetFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
420 crate::operation::get_flow_execution::GetFlowExecutionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
421 crate::operation::get_flow_execution::GetFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
422 crate::operation::get_flow_execution::GetFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
423 crate::operation::get_flow_execution::GetFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
424 }
425 }
426}
427impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>> for Error
428where
429 R: Send + Sync + std::fmt::Debug + 'static,
430{
431 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>) -> Self {
432 match err {
433 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
434 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
435 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
436 source: err.into(),
437 }),
438 }
439 }
440}
441impl From<crate::operation::get_invocation_step::GetInvocationStepError> for Error {
442 fn from(err: crate::operation::get_invocation_step::GetInvocationStepError) -> Self {
443 match err {
444 crate::operation::get_invocation_step::GetInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
445 crate::operation::get_invocation_step::GetInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
446 crate::operation::get_invocation_step::GetInvocationStepError::ResourceNotFoundException(inner) => {
447 Error::ResourceNotFoundException(inner)
448 }
449 crate::operation::get_invocation_step::GetInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
450 crate::operation::get_invocation_step::GetInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
451 crate::operation::get_invocation_step::GetInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
452 }
453 }
454}
455impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>> for Error
456where
457 R: Send + Sync + std::fmt::Debug + 'static,
458{
459 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>) -> Self {
460 match err {
461 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
462 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
463 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
464 source: err.into(),
465 }),
466 }
467 }
468}
469impl From<crate::operation::get_session::GetSessionError> for Error {
470 fn from(err: crate::operation::get_session::GetSessionError) -> Self {
471 match err {
472 crate::operation::get_session::GetSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
473 crate::operation::get_session::GetSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
474 crate::operation::get_session::GetSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
475 crate::operation::get_session::GetSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
476 crate::operation::get_session::GetSessionError::ValidationException(inner) => Error::ValidationException(inner),
477 crate::operation::get_session::GetSessionError::Unhandled(inner) => Error::Unhandled(inner),
478 }
479 }
480}
481impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>> for Error
482where
483 R: Send + Sync + std::fmt::Debug + 'static,
484{
485 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>) -> Self {
486 match err {
487 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
488 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
489 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
490 source: err.into(),
491 }),
492 }
493 }
494}
495impl From<crate::operation::invoke_agent::InvokeAgentError> for Error {
496 fn from(err: crate::operation::invoke_agent::InvokeAgentError) -> Self {
497 match err {
498 crate::operation::invoke_agent::InvokeAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
499 crate::operation::invoke_agent::InvokeAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
500 crate::operation::invoke_agent::InvokeAgentError::ConflictException(inner) => Error::ConflictException(inner),
501 crate::operation::invoke_agent::InvokeAgentError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
502 crate::operation::invoke_agent::InvokeAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
503 crate::operation::invoke_agent::InvokeAgentError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
504 crate::operation::invoke_agent::InvokeAgentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
505 crate::operation::invoke_agent::InvokeAgentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
506 crate::operation::invoke_agent::InvokeAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
507 crate::operation::invoke_agent::InvokeAgentError::ValidationException(inner) => Error::ValidationException(inner),
508 crate::operation::invoke_agent::InvokeAgentError::Unhandled(inner) => Error::Unhandled(inner),
509 }
510 }
511}
512impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>> for Error
513where
514 R: Send + Sync + std::fmt::Debug + 'static,
515{
516 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>) -> Self {
517 match err {
518 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
519 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
520 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
521 source: err.into(),
522 }),
523 }
524 }
525}
526impl From<crate::operation::invoke_flow::InvokeFlowError> for Error {
527 fn from(err: crate::operation::invoke_flow::InvokeFlowError) -> Self {
528 match err {
529 crate::operation::invoke_flow::InvokeFlowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
530 crate::operation::invoke_flow::InvokeFlowError::BadGatewayException(inner) => Error::BadGatewayException(inner),
531 crate::operation::invoke_flow::InvokeFlowError::ConflictException(inner) => Error::ConflictException(inner),
532 crate::operation::invoke_flow::InvokeFlowError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
533 crate::operation::invoke_flow::InvokeFlowError::InternalServerException(inner) => Error::InternalServerException(inner),
534 crate::operation::invoke_flow::InvokeFlowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
535 crate::operation::invoke_flow::InvokeFlowError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
536 crate::operation::invoke_flow::InvokeFlowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
537 crate::operation::invoke_flow::InvokeFlowError::ValidationException(inner) => Error::ValidationException(inner),
538 crate::operation::invoke_flow::InvokeFlowError::Unhandled(inner) => Error::Unhandled(inner),
539 }
540 }
541}
542impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>> for Error
543where
544 R: Send + Sync + std::fmt::Debug + 'static,
545{
546 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>) -> Self {
547 match err {
548 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
549 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
550 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
551 source: err.into(),
552 }),
553 }
554 }
555}
556impl From<crate::operation::invoke_inline_agent::InvokeInlineAgentError> for Error {
557 fn from(err: crate::operation::invoke_inline_agent::InvokeInlineAgentError) -> Self {
558 match err {
559 crate::operation::invoke_inline_agent::InvokeInlineAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
560 crate::operation::invoke_inline_agent::InvokeInlineAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
561 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ConflictException(inner) => Error::ConflictException(inner),
562 crate::operation::invoke_inline_agent::InvokeInlineAgentError::DependencyFailedException(inner) => {
563 Error::DependencyFailedException(inner)
564 }
565 crate::operation::invoke_inline_agent::InvokeInlineAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
566 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ResourceNotFoundException(inner) => {
567 Error::ResourceNotFoundException(inner)
568 }
569 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ServiceQuotaExceededException(inner) => {
570 Error::ServiceQuotaExceededException(inner)
571 }
572 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
573 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ValidationException(inner) => Error::ValidationException(inner),
574 crate::operation::invoke_inline_agent::InvokeInlineAgentError::Unhandled(inner) => Error::Unhandled(inner),
575 }
576 }
577}
578impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError, R>>
579 for Error
580where
581 R: Send + Sync + std::fmt::Debug + 'static,
582{
583 fn from(
584 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError, R>,
585 ) -> Self {
586 match err {
587 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
588 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
589 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
590 source: err.into(),
591 }),
592 }
593 }
594}
595impl From<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError> for Error {
596 fn from(err: crate::operation::list_flow_execution_events::ListFlowExecutionEventsError) -> Self {
597 match err {
598 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::AccessDeniedException(inner) => {
599 Error::AccessDeniedException(inner)
600 }
601 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::InternalServerException(inner) => {
602 Error::InternalServerException(inner)
603 }
604 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ResourceNotFoundException(inner) => {
605 Error::ResourceNotFoundException(inner)
606 }
607 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ThrottlingException(inner) => {
608 Error::ThrottlingException(inner)
609 }
610 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ValidationException(inner) => {
611 Error::ValidationException(inner)
612 }
613 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::Unhandled(inner) => Error::Unhandled(inner),
614 }
615 }
616}
617impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_executions::ListFlowExecutionsError, R>> for Error
618where
619 R: Send + Sync + std::fmt::Debug + 'static,
620{
621 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_executions::ListFlowExecutionsError, R>) -> Self {
622 match err {
623 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
624 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
625 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
626 source: err.into(),
627 }),
628 }
629 }
630}
631impl From<crate::operation::list_flow_executions::ListFlowExecutionsError> for Error {
632 fn from(err: crate::operation::list_flow_executions::ListFlowExecutionsError) -> Self {
633 match err {
634 crate::operation::list_flow_executions::ListFlowExecutionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
635 crate::operation::list_flow_executions::ListFlowExecutionsError::InternalServerException(inner) => Error::InternalServerException(inner),
636 crate::operation::list_flow_executions::ListFlowExecutionsError::ResourceNotFoundException(inner) => {
637 Error::ResourceNotFoundException(inner)
638 }
639 crate::operation::list_flow_executions::ListFlowExecutionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
640 crate::operation::list_flow_executions::ListFlowExecutionsError::ValidationException(inner) => Error::ValidationException(inner),
641 crate::operation::list_flow_executions::ListFlowExecutionsError::Unhandled(inner) => Error::Unhandled(inner),
642 }
643 }
644}
645impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>> for Error
646where
647 R: Send + Sync + std::fmt::Debug + 'static,
648{
649 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>) -> Self {
650 match err {
651 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
652 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
653 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
654 source: err.into(),
655 }),
656 }
657 }
658}
659impl From<crate::operation::list_invocations::ListInvocationsError> for Error {
660 fn from(err: crate::operation::list_invocations::ListInvocationsError) -> Self {
661 match err {
662 crate::operation::list_invocations::ListInvocationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
663 crate::operation::list_invocations::ListInvocationsError::InternalServerException(inner) => Error::InternalServerException(inner),
664 crate::operation::list_invocations::ListInvocationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
665 crate::operation::list_invocations::ListInvocationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
666 crate::operation::list_invocations::ListInvocationsError::ValidationException(inner) => Error::ValidationException(inner),
667 crate::operation::list_invocations::ListInvocationsError::Unhandled(inner) => Error::Unhandled(inner),
668 }
669 }
670}
671impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocation_steps::ListInvocationStepsError, R>> for Error
672where
673 R: Send + Sync + std::fmt::Debug + 'static,
674{
675 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocation_steps::ListInvocationStepsError, R>) -> Self {
676 match err {
677 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
678 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
679 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
680 source: err.into(),
681 }),
682 }
683 }
684}
685impl From<crate::operation::list_invocation_steps::ListInvocationStepsError> for Error {
686 fn from(err: crate::operation::list_invocation_steps::ListInvocationStepsError) -> Self {
687 match err {
688 crate::operation::list_invocation_steps::ListInvocationStepsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
689 crate::operation::list_invocation_steps::ListInvocationStepsError::InternalServerException(inner) => {
690 Error::InternalServerException(inner)
691 }
692 crate::operation::list_invocation_steps::ListInvocationStepsError::ResourceNotFoundException(inner) => {
693 Error::ResourceNotFoundException(inner)
694 }
695 crate::operation::list_invocation_steps::ListInvocationStepsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
696 crate::operation::list_invocation_steps::ListInvocationStepsError::ValidationException(inner) => Error::ValidationException(inner),
697 crate::operation::list_invocation_steps::ListInvocationStepsError::Unhandled(inner) => Error::Unhandled(inner),
698 }
699 }
700}
701impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sessions::ListSessionsError, R>> for Error
702where
703 R: Send + Sync + std::fmt::Debug + 'static,
704{
705 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sessions::ListSessionsError, R>) -> Self {
706 match err {
707 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
708 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
709 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
710 source: err.into(),
711 }),
712 }
713 }
714}
715impl From<crate::operation::list_sessions::ListSessionsError> for Error {
716 fn from(err: crate::operation::list_sessions::ListSessionsError) -> Self {
717 match err {
718 crate::operation::list_sessions::ListSessionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
719 crate::operation::list_sessions::ListSessionsError::InternalServerException(inner) => Error::InternalServerException(inner),
720 crate::operation::list_sessions::ListSessionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
721 crate::operation::list_sessions::ListSessionsError::ValidationException(inner) => Error::ValidationException(inner),
722 crate::operation::list_sessions::ListSessionsError::Unhandled(inner) => Error::Unhandled(inner),
723 }
724 }
725}
726impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
727where
728 R: Send + Sync + std::fmt::Debug + 'static,
729{
730 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
731 match err {
732 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
733 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
734 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
735 source: err.into(),
736 }),
737 }
738 }
739}
740impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
741 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
742 match err {
743 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
744 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
745 Error::InternalServerException(inner)
746 }
747 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
748 Error::ResourceNotFoundException(inner)
749 }
750 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
751 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
752 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
753 }
754 }
755}
756impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>> for Error
757where
758 R: Send + Sync + std::fmt::Debug + 'static,
759{
760 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>) -> Self {
761 match err {
762 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
763 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
764 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
765 source: err.into(),
766 }),
767 }
768 }
769}
770impl From<crate::operation::optimize_prompt::OptimizePromptError> for Error {
771 fn from(err: crate::operation::optimize_prompt::OptimizePromptError) -> Self {
772 match err {
773 crate::operation::optimize_prompt::OptimizePromptError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
774 crate::operation::optimize_prompt::OptimizePromptError::BadGatewayException(inner) => Error::BadGatewayException(inner),
775 crate::operation::optimize_prompt::OptimizePromptError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
776 crate::operation::optimize_prompt::OptimizePromptError::InternalServerException(inner) => Error::InternalServerException(inner),
777 crate::operation::optimize_prompt::OptimizePromptError::ThrottlingException(inner) => Error::ThrottlingException(inner),
778 crate::operation::optimize_prompt::OptimizePromptError::ValidationException(inner) => Error::ValidationException(inner),
779 crate::operation::optimize_prompt::OptimizePromptError::Unhandled(inner) => Error::Unhandled(inner),
780 }
781 }
782}
783impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_invocation_step::PutInvocationStepError, 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::put_invocation_step::PutInvocationStepError, 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::put_invocation_step::PutInvocationStepError> for Error {
798 fn from(err: crate::operation::put_invocation_step::PutInvocationStepError) -> Self {
799 match err {
800 crate::operation::put_invocation_step::PutInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
801 crate::operation::put_invocation_step::PutInvocationStepError::ConflictException(inner) => Error::ConflictException(inner),
802 crate::operation::put_invocation_step::PutInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
803 crate::operation::put_invocation_step::PutInvocationStepError::ResourceNotFoundException(inner) => {
804 Error::ResourceNotFoundException(inner)
805 }
806 crate::operation::put_invocation_step::PutInvocationStepError::ServiceQuotaExceededException(inner) => {
807 Error::ServiceQuotaExceededException(inner)
808 }
809 crate::operation::put_invocation_step::PutInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
810 crate::operation::put_invocation_step::PutInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
811 crate::operation::put_invocation_step::PutInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
812 }
813 }
814}
815impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>> for Error
816where
817 R: Send + Sync + std::fmt::Debug + 'static,
818{
819 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>) -> Self {
820 match err {
821 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
822 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
823 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
824 source: err.into(),
825 }),
826 }
827 }
828}
829impl From<crate::operation::rerank::RerankError> for Error {
830 fn from(err: crate::operation::rerank::RerankError) -> Self {
831 match err {
832 crate::operation::rerank::RerankError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
833 crate::operation::rerank::RerankError::BadGatewayException(inner) => Error::BadGatewayException(inner),
834 crate::operation::rerank::RerankError::ConflictException(inner) => Error::ConflictException(inner),
835 crate::operation::rerank::RerankError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
836 crate::operation::rerank::RerankError::InternalServerException(inner) => Error::InternalServerException(inner),
837 crate::operation::rerank::RerankError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
838 crate::operation::rerank::RerankError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
839 crate::operation::rerank::RerankError::ThrottlingException(inner) => Error::ThrottlingException(inner),
840 crate::operation::rerank::RerankError::ValidationException(inner) => Error::ValidationException(inner),
841 crate::operation::rerank::RerankError::Unhandled(inner) => Error::Unhandled(inner),
842 }
843 }
844}
845impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>> for Error
846where
847 R: Send + Sync + std::fmt::Debug + 'static,
848{
849 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>) -> Self {
850 match err {
851 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
852 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
853 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
854 source: err.into(),
855 }),
856 }
857 }
858}
859impl From<crate::operation::retrieve::RetrieveError> for Error {
860 fn from(err: crate::operation::retrieve::RetrieveError) -> Self {
861 match err {
862 crate::operation::retrieve::RetrieveError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
863 crate::operation::retrieve::RetrieveError::BadGatewayException(inner) => Error::BadGatewayException(inner),
864 crate::operation::retrieve::RetrieveError::ConflictException(inner) => Error::ConflictException(inner),
865 crate::operation::retrieve::RetrieveError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
866 crate::operation::retrieve::RetrieveError::InternalServerException(inner) => Error::InternalServerException(inner),
867 crate::operation::retrieve::RetrieveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
868 crate::operation::retrieve::RetrieveError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
869 crate::operation::retrieve::RetrieveError::ThrottlingException(inner) => Error::ThrottlingException(inner),
870 crate::operation::retrieve::RetrieveError::ValidationException(inner) => Error::ValidationException(inner),
871 crate::operation::retrieve::RetrieveError::Unhandled(inner) => Error::Unhandled(inner),
872 }
873 }
874}
875impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>> for Error
876where
877 R: Send + Sync + std::fmt::Debug + 'static,
878{
879 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>) -> Self {
880 match err {
881 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
882 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
883 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
884 source: err.into(),
885 }),
886 }
887 }
888}
889impl From<crate::operation::retrieve_and_generate::RetrieveAndGenerateError> for Error {
890 fn from(err: crate::operation::retrieve_and_generate::RetrieveAndGenerateError) -> Self {
891 match err {
892 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
893 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::BadGatewayException(inner) => Error::BadGatewayException(inner),
894 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ConflictException(inner) => Error::ConflictException(inner),
895 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::DependencyFailedException(inner) => {
896 Error::DependencyFailedException(inner)
897 }
898 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::InternalServerException(inner) => {
899 Error::InternalServerException(inner)
900 }
901 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ResourceNotFoundException(inner) => {
902 Error::ResourceNotFoundException(inner)
903 }
904 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ServiceQuotaExceededException(inner) => {
905 Error::ServiceQuotaExceededException(inner)
906 }
907 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
908 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ValidationException(inner) => Error::ValidationException(inner),
909 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::Unhandled(inner) => Error::Unhandled(inner),
910 }
911 }
912}
913impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>>
914 for Error
915where
916 R: Send + Sync + std::fmt::Debug + 'static,
917{
918 fn from(
919 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>,
920 ) -> 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::retrieve_and_generate_stream::RetrieveAndGenerateStreamError> for Error {
931 fn from(err: crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError) -> Self {
932 match err {
933 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::AccessDeniedException(inner) => {
934 Error::AccessDeniedException(inner)
935 }
936 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::BadGatewayException(inner) => {
937 Error::BadGatewayException(inner)
938 }
939 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ConflictException(inner) => {
940 Error::ConflictException(inner)
941 }
942 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::DependencyFailedException(inner) => {
943 Error::DependencyFailedException(inner)
944 }
945 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::InternalServerException(inner) => {
946 Error::InternalServerException(inner)
947 }
948 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ResourceNotFoundException(inner) => {
949 Error::ResourceNotFoundException(inner)
950 }
951 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ServiceQuotaExceededException(inner) => {
952 Error::ServiceQuotaExceededException(inner)
953 }
954 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ThrottlingException(inner) => {
955 Error::ThrottlingException(inner)
956 }
957 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ValidationException(inner) => {
958 Error::ValidationException(inner)
959 }
960 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::Unhandled(inner) => Error::Unhandled(inner),
961 }
962 }
963}
964impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flow_execution::StartFlowExecutionError, R>> for Error
965where
966 R: Send + Sync + std::fmt::Debug + 'static,
967{
968 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flow_execution::StartFlowExecutionError, R>) -> Self {
969 match err {
970 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
971 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
972 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
973 source: err.into(),
974 }),
975 }
976 }
977}
978impl From<crate::operation::start_flow_execution::StartFlowExecutionError> for Error {
979 fn from(err: crate::operation::start_flow_execution::StartFlowExecutionError) -> Self {
980 match err {
981 crate::operation::start_flow_execution::StartFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
982 crate::operation::start_flow_execution::StartFlowExecutionError::BadGatewayException(inner) => Error::BadGatewayException(inner),
983 crate::operation::start_flow_execution::StartFlowExecutionError::ConflictException(inner) => Error::ConflictException(inner),
984 crate::operation::start_flow_execution::StartFlowExecutionError::DependencyFailedException(inner) => {
985 Error::DependencyFailedException(inner)
986 }
987 crate::operation::start_flow_execution::StartFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
988 crate::operation::start_flow_execution::StartFlowExecutionError::ResourceNotFoundException(inner) => {
989 Error::ResourceNotFoundException(inner)
990 }
991 crate::operation::start_flow_execution::StartFlowExecutionError::ServiceQuotaExceededException(inner) => {
992 Error::ServiceQuotaExceededException(inner)
993 }
994 crate::operation::start_flow_execution::StartFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
995 crate::operation::start_flow_execution::StartFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
996 crate::operation::start_flow_execution::StartFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
997 }
998 }
999}
1000impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_flow_execution::StopFlowExecutionError, 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::stop_flow_execution::StopFlowExecutionError, 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::stop_flow_execution::StopFlowExecutionError> for Error {
1015 fn from(err: crate::operation::stop_flow_execution::StopFlowExecutionError) -> Self {
1016 match err {
1017 crate::operation::stop_flow_execution::StopFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1018 crate::operation::stop_flow_execution::StopFlowExecutionError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1019 crate::operation::stop_flow_execution::StopFlowExecutionError::ConflictException(inner) => Error::ConflictException(inner),
1020 crate::operation::stop_flow_execution::StopFlowExecutionError::DependencyFailedException(inner) => {
1021 Error::DependencyFailedException(inner)
1022 }
1023 crate::operation::stop_flow_execution::StopFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
1024 crate::operation::stop_flow_execution::StopFlowExecutionError::ResourceNotFoundException(inner) => {
1025 Error::ResourceNotFoundException(inner)
1026 }
1027 crate::operation::stop_flow_execution::StopFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1028 crate::operation::stop_flow_execution::StopFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
1029 crate::operation::stop_flow_execution::StopFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
1030 }
1031 }
1032}
1033impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1034where
1035 R: Send + Sync + std::fmt::Debug + 'static,
1036{
1037 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1038 match err {
1039 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1040 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1041 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1042 source: err.into(),
1043 }),
1044 }
1045 }
1046}
1047impl From<crate::operation::tag_resource::TagResourceError> for Error {
1048 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1049 match err {
1050 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1051 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1052 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1053 crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1054 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1055 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1056 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1057 }
1058 }
1059}
1060impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
1061where
1062 R: Send + Sync + std::fmt::Debug + 'static,
1063{
1064 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
1065 match err {
1066 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1067 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1068 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1069 source: err.into(),
1070 }),
1071 }
1072 }
1073}
1074impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1075 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1076 match err {
1077 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1078 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1079 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1080 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1081 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1082 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1083 }
1084 }
1085}
1086impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>> for Error
1087where
1088 R: Send + Sync + std::fmt::Debug + 'static,
1089{
1090 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>) -> Self {
1091 match err {
1092 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1093 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1094 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1095 source: err.into(),
1096 }),
1097 }
1098 }
1099}
1100impl From<crate::operation::update_session::UpdateSessionError> for Error {
1101 fn from(err: crate::operation::update_session::UpdateSessionError) -> Self {
1102 match err {
1103 crate::operation::update_session::UpdateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1104 crate::operation::update_session::UpdateSessionError::ConflictException(inner) => Error::ConflictException(inner),
1105 crate::operation::update_session::UpdateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
1106 crate::operation::update_session::UpdateSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1107 crate::operation::update_session::UpdateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1108 crate::operation::update_session::UpdateSessionError::ValidationException(inner) => Error::ValidationException(inner),
1109 crate::operation::update_session::UpdateSessionError::Unhandled(inner) => Error::Unhandled(inner),
1110 }
1111 }
1112}
1113impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::AgenticRetrieveStreamResponseOutputError, R>> for Error
1114where
1115 R: Send + Sync + std::fmt::Debug + 'static,
1116{
1117 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::AgenticRetrieveStreamResponseOutputError, R>) -> Self {
1118 match err {
1119 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1120 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1121 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1122 source: err.into(),
1123 }),
1124 }
1125 }
1126}
1127impl From<crate::types::error::AgenticRetrieveStreamResponseOutputError> for Error {
1128 fn from(err: crate::types::error::AgenticRetrieveStreamResponseOutputError) -> Self {
1129 match err {
1130 crate::types::error::AgenticRetrieveStreamResponseOutputError::InternalServerException(inner) => Error::InternalServerException(inner),
1131 crate::types::error::AgenticRetrieveStreamResponseOutputError::ValidationException(inner) => Error::ValidationException(inner),
1132 crate::types::error::AgenticRetrieveStreamResponseOutputError::ResourceNotFoundException(inner) => {
1133 Error::ResourceNotFoundException(inner)
1134 }
1135 crate::types::error::AgenticRetrieveStreamResponseOutputError::ServiceQuotaExceededException(inner) => {
1136 Error::ServiceQuotaExceededException(inner)
1137 }
1138 crate::types::error::AgenticRetrieveStreamResponseOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1139 crate::types::error::AgenticRetrieveStreamResponseOutputError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1140 crate::types::error::AgenticRetrieveStreamResponseOutputError::ConflictException(inner) => Error::ConflictException(inner),
1141 crate::types::error::AgenticRetrieveStreamResponseOutputError::DependencyFailedException(inner) => {
1142 Error::DependencyFailedException(inner)
1143 }
1144 crate::types::error::AgenticRetrieveStreamResponseOutputError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1145 crate::types::error::AgenticRetrieveStreamResponseOutputError::Unhandled(inner) => Error::Unhandled(inner),
1146 }
1147 }
1148}
1149impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>> for Error
1150where
1151 R: Send + Sync + std::fmt::Debug + 'static,
1152{
1153 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>) -> Self {
1154 match err {
1155 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1156 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1157 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1158 source: err.into(),
1159 }),
1160 }
1161 }
1162}
1163impl From<crate::types::error::ResponseStreamError> for Error {
1164 fn from(err: crate::types::error::ResponseStreamError) -> Self {
1165 match err {
1166 crate::types::error::ResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1167 crate::types::error::ResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1168 crate::types::error::ResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1169 crate::types::error::ResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1170 crate::types::error::ResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1171 crate::types::error::ResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1172 crate::types::error::ResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1173 crate::types::error::ResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1174 crate::types::error::ResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1175 crate::types::error::ResponseStreamError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
1176 crate::types::error::ResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1177 }
1178 }
1179}
1180impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>> for Error
1181where
1182 R: Send + Sync + std::fmt::Debug + 'static,
1183{
1184 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>) -> Self {
1185 match err {
1186 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1187 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1188 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1189 source: err.into(),
1190 }),
1191 }
1192 }
1193}
1194impl From<crate::types::error::FlowResponseStreamError> for Error {
1195 fn from(err: crate::types::error::FlowResponseStreamError) -> Self {
1196 match err {
1197 crate::types::error::FlowResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1198 crate::types::error::FlowResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1199 crate::types::error::FlowResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1200 crate::types::error::FlowResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1201 crate::types::error::FlowResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1202 crate::types::error::FlowResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1203 crate::types::error::FlowResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1204 crate::types::error::FlowResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1205 crate::types::error::FlowResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1206 crate::types::error::FlowResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1207 }
1208 }
1209}
1210impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InlineAgentResponseStreamError, 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::types::error::InlineAgentResponseStreamError, 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::types::error::InlineAgentResponseStreamError> for Error {
1225 fn from(err: crate::types::error::InlineAgentResponseStreamError) -> Self {
1226 match err {
1227 crate::types::error::InlineAgentResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1228 crate::types::error::InlineAgentResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1229 crate::types::error::InlineAgentResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1230 crate::types::error::InlineAgentResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1231 crate::types::error::InlineAgentResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1232 crate::types::error::InlineAgentResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1233 crate::types::error::InlineAgentResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1234 crate::types::error::InlineAgentResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1235 crate::types::error::InlineAgentResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1236 crate::types::error::InlineAgentResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1237 }
1238 }
1239}
1240impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>> for Error
1241where
1242 R: Send + Sync + std::fmt::Debug + 'static,
1243{
1244 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>) -> Self {
1245 match err {
1246 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1247 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1248 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1249 source: err.into(),
1250 }),
1251 }
1252 }
1253}
1254impl From<crate::types::error::OptimizedPromptStreamError> for Error {
1255 fn from(err: crate::types::error::OptimizedPromptStreamError) -> Self {
1256 match err {
1257 crate::types::error::OptimizedPromptStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1258 crate::types::error::OptimizedPromptStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1259 crate::types::error::OptimizedPromptStreamError::ValidationException(inner) => Error::ValidationException(inner),
1260 crate::types::error::OptimizedPromptStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1261 crate::types::error::OptimizedPromptStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1262 crate::types::error::OptimizedPromptStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1263 crate::types::error::OptimizedPromptStreamError::Unhandled(inner) => Error::Unhandled(inner),
1264 }
1265 }
1266}
1267impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>> for Error
1268where
1269 R: Send + Sync + std::fmt::Debug + 'static,
1270{
1271 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>) -> Self {
1272 match err {
1273 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1274 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1275 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1276 source: err.into(),
1277 }),
1278 }
1279 }
1280}
1281impl From<crate::types::error::RetrieveAndGenerateStreamResponseOutputError> for Error {
1282 fn from(err: crate::types::error::RetrieveAndGenerateStreamResponseOutputError) -> Self {
1283 match err {
1284 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::InternalServerException(inner) => {
1285 Error::InternalServerException(inner)
1286 }
1287 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ValidationException(inner) => Error::ValidationException(inner),
1288 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ResourceNotFoundException(inner) => {
1289 Error::ResourceNotFoundException(inner)
1290 }
1291 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ServiceQuotaExceededException(inner) => {
1292 Error::ServiceQuotaExceededException(inner)
1293 }
1294 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1295 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1296 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ConflictException(inner) => Error::ConflictException(inner),
1297 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::DependencyFailedException(inner) => {
1298 Error::DependencyFailedException(inner)
1299 }
1300 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1301 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::Unhandled(inner) => Error::Unhandled(inner),
1302 }
1303 }
1304}
1305impl ::std::error::Error for Error {
1306 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1307 match self {
1308 Error::AccessDeniedException(inner) => inner.source(),
1309 Error::BadGatewayException(inner) => inner.source(),
1310 Error::ConflictException(inner) => inner.source(),
1311 Error::DependencyFailedException(inner) => inner.source(),
1312 Error::InternalServerException(inner) => inner.source(),
1313 Error::ModelNotReadyException(inner) => inner.source(),
1314 Error::ResourceNotFoundException(inner) => inner.source(),
1315 Error::ServiceQuotaExceededException(inner) => inner.source(),
1316 Error::ThrottlingException(inner) => inner.source(),
1317 Error::ValidationException(inner) => inner.source(),
1318 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1319 }
1320 }
1321}
1322impl ::aws_types::request_id::RequestId for Error {
1323 fn request_id(&self) -> Option<&str> {
1324 match self {
1325 Self::AccessDeniedException(e) => e.request_id(),
1326 Self::BadGatewayException(e) => e.request_id(),
1327 Self::ConflictException(e) => e.request_id(),
1328 Self::DependencyFailedException(e) => e.request_id(),
1329 Self::InternalServerException(e) => e.request_id(),
1330 Self::ModelNotReadyException(e) => e.request_id(),
1331 Self::ResourceNotFoundException(e) => e.request_id(),
1332 Self::ServiceQuotaExceededException(e) => e.request_id(),
1333 Self::ThrottlingException(e) => e.request_id(),
1334 Self::ValidationException(e) => e.request_id(),
1335 Self::Unhandled(e) => e.meta.request_id(),
1336 }
1337 }
1338}