1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | /// All possible error types for this service.
|
3 3 | #[non_exhaustive]
|
4 4 | #[derive(::std::fmt::Debug)]
|
5 5 | pub enum Error {
|
6 - | /// <p>The request is denied because of missing access permissions.</p>
|
6 + | /// <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
|
7 7 | AccessDeniedException(crate::types::error::AccessDeniedException),
|
8 - | /// <p>An internal server error occurred. Retry your request.</p>
|
8 + | /// <p>Error occurred because of a conflict while performing an operation.</p>
|
9 + | ConflictException(crate::types::error::ConflictException),
|
10 + | /// <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
|
9 11 | InternalServerException(crate::types::error::InternalServerException),
|
10 12 | /// <p>The request failed due to an error while processing the model.</p>
|
11 13 | ModelErrorException(crate::types::error::ModelErrorException),
|
12 - | /// <p>The model specified in the request is not ready to serve inference requests.</p>
|
14 + | /// <p>The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i> reference guide.</p>
|
13 15 | ModelNotReadyException(crate::types::error::ModelNotReadyException),
|
14 16 | /// <p>An error occurred while streaming the response. Retry your request.</p>
|
15 17 | ModelStreamErrorException(crate::types::error::ModelStreamErrorException),
|
16 18 | /// <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
|
17 19 | ModelTimeoutException(crate::types::error::ModelTimeoutException),
|
18 - | /// <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
|
20 + | /// <p>The specified resource ARN was not found. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
|
19 21 | ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
|
20 - | /// <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
|
22 + | /// <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
|
21 23 | ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
|
22 - | /// <p>The number of requests exceeds the limit. Resubmit your request later.</p>
|
24 + | /// <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
|
25 + | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
26 + | /// <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
|
23 27 | ThrottlingException(crate::types::error::ThrottlingException),
|
24 - | /// <p>Input validation failed. Check your request parameters and retry the request.</p>
|
28 + | /// <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
|
25 29 | ValidationException(crate::types::error::ValidationException),
|
26 30 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
27 31 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
28 32 | variable wildcard pattern and check `.code()`:
|
29 33 | \
|
30 34 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
31 35 | \
|
32 36 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
|
33 37 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
34 38 | }
|
35 39 | impl ::std::fmt::Display for Error {
|
36 40 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
37 41 | match self {
|
38 42 | Error::AccessDeniedException(inner) => inner.fmt(f),
|
43 + | Error::ConflictException(inner) => inner.fmt(f),
|
39 44 | Error::InternalServerException(inner) => inner.fmt(f),
|
40 45 | Error::ModelErrorException(inner) => inner.fmt(f),
|
41 46 | Error::ModelNotReadyException(inner) => inner.fmt(f),
|
42 47 | Error::ModelStreamErrorException(inner) => inner.fmt(f),
|
43 48 | Error::ModelTimeoutException(inner) => inner.fmt(f),
|
44 49 | Error::ResourceNotFoundException(inner) => inner.fmt(f),
|
45 50 | Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
|
51 + | Error::ServiceUnavailableException(inner) => inner.fmt(f),
|
46 52 | Error::ThrottlingException(inner) => inner.fmt(f),
|
47 53 | Error::ValidationException(inner) => inner.fmt(f),
|
48 54 | Error::Unhandled(_) => {
|
49 55 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
50 56 | write!(f, "unhandled error ({code})")
|
51 57 | } else {
|
52 58 | f.write_str("unhandled error")
|
53 59 | }
|
54 60 | }
|
55 61 | }
|
56 62 | }
|
57 63 | }
|
58 64 | impl From<::aws_smithy_types::error::operation::BuildError> for Error {
|
59 65 | fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
|
60 66 | Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
61 67 | source: value.into(),
|
62 68 | meta: ::std::default::Default::default(),
|
63 69 | })
|
64 70 | }
|
65 71 | }
|
66 72 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
|
67 73 | fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
|
68 74 | match self {
|
69 75 | Self::AccessDeniedException(inner) => inner.meta(),
|
76 + | Self::ConflictException(inner) => inner.meta(),
|
70 77 | Self::InternalServerException(inner) => inner.meta(),
|
71 78 | Self::ModelErrorException(inner) => inner.meta(),
|
72 79 | Self::ModelNotReadyException(inner) => inner.meta(),
|
73 80 | Self::ModelStreamErrorException(inner) => inner.meta(),
|
74 81 | Self::ModelTimeoutException(inner) => inner.meta(),
|
75 82 | Self::ResourceNotFoundException(inner) => inner.meta(),
|
76 83 | Self::ServiceQuotaExceededException(inner) => inner.meta(),
|
84 + | Self::ServiceUnavailableException(inner) => inner.meta(),
|
77 85 | Self::ThrottlingException(inner) => inner.meta(),
|
78 86 | Self::ValidationException(inner) => inner.meta(),
|
79 87 | Self::Unhandled(inner) => &inner.meta,
|
80 88 | }
|
81 89 | }
|
82 90 | }
|
91 + | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::apply_guardrail::ApplyGuardrailError, R>> for Error
|
92 + | where
|
93 + | R: Send + Sync + std::fmt::Debug + 'static,
|
94 + | {
|
95 + | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::apply_guardrail::ApplyGuardrailError, R>) -> Self {
|
96 + | match err {
|
97 + | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
98 + | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
99 + | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
100 + | source: err.into(),
|
101 + | }),
|
102 + | }
|
103 + | }
|
104 + | }
|
105 + | impl From<crate::operation::apply_guardrail::ApplyGuardrailError> for Error {
|
106 + | fn from(err: crate::operation::apply_guardrail::ApplyGuardrailError) -> Self {
|
107 + | match err {
|
108 + | crate::operation::apply_guardrail::ApplyGuardrailError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
|
109 + | crate::operation::apply_guardrail::ApplyGuardrailError::InternalServerException(inner) => Error::InternalServerException(inner),
|
110 + | crate::operation::apply_guardrail::ApplyGuardrailError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
|
111 + | crate::operation::apply_guardrail::ApplyGuardrailError::ServiceQuotaExceededException(inner) => {
|
112 + | Error::ServiceQuotaExceededException(inner)
|
113 + | }
|
114 + | crate::operation::apply_guardrail::ApplyGuardrailError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
115 + | crate::operation::apply_guardrail::ApplyGuardrailError::ValidationException(inner) => Error::ValidationException(inner),
|
116 + | crate::operation::apply_guardrail::ApplyGuardrailError::Unhandled(inner) => Error::Unhandled(inner),
|
117 + | }
|
118 + | }
|
119 + | }
|
83 120 | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::converse::ConverseError, R>> for Error
|
84 121 | where
|
85 122 | R: Send + Sync + std::fmt::Debug + 'static,
|
86 123 | {
|
87 124 | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::converse::ConverseError, R>) -> Self {
|
88 125 | match err {
|
89 126 | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
90 127 | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
91 128 | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
92 129 | source: err.into(),
|
93 130 | }),
|
94 131 | }
|
95 132 | }
|
96 133 | }
|
97 134 | impl From<crate::operation::converse::ConverseError> for Error {
|
98 135 | fn from(err: crate::operation::converse::ConverseError) -> Self {
|
99 136 | match err {
|
100 137 | crate::operation::converse::ConverseError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
|
101 138 | crate::operation::converse::ConverseError::InternalServerException(inner) => Error::InternalServerException(inner),
|
102 139 | crate::operation::converse::ConverseError::ModelErrorException(inner) => Error::ModelErrorException(inner),
|
103 140 | crate::operation::converse::ConverseError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
|
104 141 | crate::operation::converse::ConverseError::ModelTimeoutException(inner) => Error::ModelTimeoutException(inner),
|
105 142 | crate::operation::converse::ConverseError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
|
143 + | crate::operation::converse::ConverseError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
|
106 144 | crate::operation::converse::ConverseError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
107 145 | crate::operation::converse::ConverseError::ValidationException(inner) => Error::ValidationException(inner),
|
108 146 | crate::operation::converse::ConverseError::Unhandled(inner) => Error::Unhandled(inner),
|
109 147 | }
|
110 148 | }
|
111 149 | }
|
112 150 | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::converse_stream::ConverseStreamError, R>> for Error
|
113 151 | where
|
114 152 | R: Send + Sync + std::fmt::Debug + 'static,
|
115 153 | {
|
116 154 | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::converse_stream::ConverseStreamError, R>) -> Self {
|
117 155 | match err {
|
118 156 | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
119 157 | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
120 158 | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
121 159 | source: err.into(),
|
122 160 | }),
|
123 161 | }
|
124 162 | }
|
125 163 | }
|
126 164 | impl From<crate::operation::converse_stream::ConverseStreamError> for Error {
|
127 165 | fn from(err: crate::operation::converse_stream::ConverseStreamError) -> Self {
|
128 166 | match err {
|
129 167 | crate::operation::converse_stream::ConverseStreamError::ModelTimeoutException(inner) => Error::ModelTimeoutException(inner),
|
130 168 | crate::operation::converse_stream::ConverseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
|
131 169 | crate::operation::converse_stream::ConverseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
|
132 170 | crate::operation::converse_stream::ConverseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
171 + | crate::operation::converse_stream::ConverseStreamError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
|
133 172 | crate::operation::converse_stream::ConverseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
|
134 173 | crate::operation::converse_stream::ConverseStreamError::ModelStreamErrorException(inner) => Error::ModelStreamErrorException(inner),
|
135 174 | crate::operation::converse_stream::ConverseStreamError::ValidationException(inner) => Error::ValidationException(inner),
|
136 175 | crate::operation::converse_stream::ConverseStreamError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
|
137 176 | crate::operation::converse_stream::ConverseStreamError::ModelErrorException(inner) => Error::ModelErrorException(inner),
|
138 177 | crate::operation::converse_stream::ConverseStreamError::Unhandled(inner) => Error::Unhandled(inner),
|
139 178 | }
|
140 179 | }
|
141 180 | }
|
181 + | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_async_invoke::GetAsyncInvokeError, R>> for Error
|
182 + | where
|
183 + | R: Send + Sync + std::fmt::Debug + 'static,
|
184 + | {
|
185 + | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_async_invoke::GetAsyncInvokeError, R>) -> Self {
|
186 + | match err {
|
187 + | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
188 + | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
189 + | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
190 + | source: err.into(),
|
191 + | }),
|
192 + | }
|
193 + | }
|
194 + | }
|
195 + | impl From<crate::operation::get_async_invoke::GetAsyncInvokeError> for Error {
|
196 + | fn from(err: crate::operation::get_async_invoke::GetAsyncInvokeError) -> Self {
|
197 + | match err {
|
198 + | crate::operation::get_async_invoke::GetAsyncInvokeError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
|
199 + | crate::operation::get_async_invoke::GetAsyncInvokeError::InternalServerException(inner) => Error::InternalServerException(inner),
|
200 + | crate::operation::get_async_invoke::GetAsyncInvokeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
201 + | crate::operation::get_async_invoke::GetAsyncInvokeError::ValidationException(inner) => Error::ValidationException(inner),
|
202 + | crate::operation::get_async_invoke::GetAsyncInvokeError::Unhandled(inner) => Error::Unhandled(inner),
|
203 + | }
|
204 + | }
|
205 + | }
|
142 206 | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_model::InvokeModelError, R>> for Error
|
143 207 | where
|
144 208 | R: Send + Sync + std::fmt::Debug + 'static,
|
145 209 | {
|
146 210 | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_model::InvokeModelError, R>) -> Self {
|
147 211 | match err {
|
148 212 | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
149 213 | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
150 214 | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
151 215 | source: err.into(),
|
152 216 | }),
|
153 217 | }
|
154 218 | }
|
155 219 | }
|
156 220 | impl From<crate::operation::invoke_model::InvokeModelError> for Error {
|
157 221 | fn from(err: crate::operation::invoke_model::InvokeModelError) -> Self {
|
158 222 | match err {
|
159 223 | crate::operation::invoke_model::InvokeModelError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
|
160 224 | crate::operation::invoke_model::InvokeModelError::InternalServerException(inner) => Error::InternalServerException(inner),
|
161 225 | crate::operation::invoke_model::InvokeModelError::ModelErrorException(inner) => Error::ModelErrorException(inner),
|
162 226 | crate::operation::invoke_model::InvokeModelError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
|
163 227 | crate::operation::invoke_model::InvokeModelError::ModelTimeoutException(inner) => Error::ModelTimeoutException(inner),
|
164 228 | crate::operation::invoke_model::InvokeModelError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
|
165 229 | crate::operation::invoke_model::InvokeModelError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
|
230 + | crate::operation::invoke_model::InvokeModelError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
|
166 231 | crate::operation::invoke_model::InvokeModelError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
167 232 | crate::operation::invoke_model::InvokeModelError::ValidationException(inner) => Error::ValidationException(inner),
|
168 233 | crate::operation::invoke_model::InvokeModelError::Unhandled(inner) => Error::Unhandled(inner),
|
169 234 | }
|
170 235 | }
|
171 236 | }
|
237 + | impl<R>
|
238 + | From<
|
239 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
240 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError,
|
241 + | R,
|
242 + | >,
|
243 + | > for Error
|
244 + | where
|
245 + | R: Send + Sync + std::fmt::Debug + 'static,
|
246 + | {
|
247 + | fn from(
|
248 + | err: ::aws_smithy_runtime_api::client::result::SdkError<
|
249 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError,
|
250 + | R,
|
251 + | >,
|
252 + | ) -> Self {
|
253 + | match err {
|
254 + | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
255 + | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
256 + | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
257 + | source: err.into(),
|
258 + | }),
|
259 + | }
|
260 + | }
|
261 + | }
|
262 + | impl From<crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError> for Error {
|
263 + | fn from(err: crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError) -> Self {
|
264 + | match err {
|
265 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelTimeoutException(inner) => {
|
266 + | Error::ModelTimeoutException(inner)
|
267 + | }
|
268 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::AccessDeniedException(inner) => {
|
269 + | Error::AccessDeniedException(inner)
|
270 + | }
|
271 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ResourceNotFoundException(inner) => {
|
272 + | Error::ResourceNotFoundException(inner)
|
273 + | }
|
274 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ThrottlingException(inner) => {
|
275 + | Error::ThrottlingException(inner)
|
276 + | }
|
277 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ServiceUnavailableException(inner) => {
|
278 + | Error::ServiceUnavailableException(inner)
|
279 + | }
|
280 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::InternalServerException(inner) => {
|
281 + | Error::InternalServerException(inner)
|
282 + | }
|
283 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelStreamErrorException(inner) => {
|
284 + | Error::ModelStreamErrorException(inner)
|
285 + | }
|
286 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ValidationException(inner) => {
|
287 + | Error::ValidationException(inner)
|
288 + | }
|
289 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelNotReadyException(inner) => {
|
290 + | Error::ModelNotReadyException(inner)
|
291 + | }
|
292 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ModelErrorException(inner) => {
|
293 + | Error::ModelErrorException(inner)
|
294 + | }
|
295 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::ServiceQuotaExceededException(
|
296 + | inner,
|
297 + | ) => Error::ServiceQuotaExceededException(inner),
|
298 + | crate::operation::invoke_model_with_bidirectional_stream::InvokeModelWithBidirectionalStreamError::Unhandled(inner) => {
|
299 + | Error::Unhandled(inner)
|
300 + | }
|
301 + | }
|
302 + | }
|
303 + | }
|
172 304 | impl<R>
|
173 305 | From<
|
174 306 | ::aws_smithy_runtime_api::client::result::SdkError<
|
175 307 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError,
|
176 308 | R,
|
177 309 | >,
|
178 310 | > for Error
|
179 311 | where
|
180 312 | R: Send + Sync + std::fmt::Debug + 'static,
|
181 313 | {
|
182 314 | fn from(
|
183 315 | err: ::aws_smithy_runtime_api::client::result::SdkError<
|
184 316 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError,
|
185 317 | R,
|
186 318 | >,
|
187 319 | ) -> Self {
|
188 320 | match err {
|
189 321 | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
190 322 | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
191 323 | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
192 324 | source: err.into(),
|
193 325 | }),
|
194 326 | }
|
195 327 | }
|
196 328 | }
|
197 329 | impl From<crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError> for Error {
|
198 330 | fn from(err: crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError) -> Self {
|
199 331 | match err {
|
200 332 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelTimeoutException(inner) => {
|
201 333 | Error::ModelTimeoutException(inner)
|
202 334 | }
|
203 335 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::AccessDeniedException(inner) => {
|
204 336 | Error::AccessDeniedException(inner)
|
205 337 | }
|
206 338 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ResourceNotFoundException(inner) => {
|
207 339 | Error::ResourceNotFoundException(inner)
|
208 340 | }
|
209 341 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ThrottlingException(inner) => {
|
210 342 | Error::ThrottlingException(inner)
|
211 343 | }
|
344 + | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ServiceUnavailableException(inner) => {
|
345 + | Error::ServiceUnavailableException(inner)
|
346 + | }
|
212 347 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::InternalServerException(inner) => {
|
213 348 | Error::InternalServerException(inner)
|
214 349 | }
|
215 350 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelStreamErrorException(inner) => {
|
216 351 | Error::ModelStreamErrorException(inner)
|
217 352 | }
|
218 353 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ValidationException(inner) => {
|
219 354 | Error::ValidationException(inner)
|
220 355 | }
|
221 356 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelNotReadyException(inner) => {
|
222 357 | Error::ModelNotReadyException(inner)
|
223 358 | }
|
224 359 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelErrorException(inner) => {
|
225 360 | Error::ModelErrorException(inner)
|
226 361 | }
|
227 362 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ServiceQuotaExceededException(inner) => {
|
228 363 | Error::ServiceQuotaExceededException(inner)
|
229 364 | }
|
230 365 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
|
231 366 | }
|
232 367 | }
|
233 368 | }
|
369 + | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_async_invokes::ListAsyncInvokesError, R>> for Error
|
370 + | where
|
371 + | R: Send + Sync + std::fmt::Debug + 'static,
|
372 + | {
|
373 + | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_async_invokes::ListAsyncInvokesError, R>) -> Self {
|
374 + | match err {
|
375 + | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
376 + | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
377 + | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
378 + | source: err.into(),
|
379 + | }),
|
380 + | }
|
381 + | }
|
382 + | }
|
383 + | impl From<crate::operation::list_async_invokes::ListAsyncInvokesError> for Error {
|
384 + | fn from(err: crate::operation::list_async_invokes::ListAsyncInvokesError) -> Self {
|
385 + | match err {
|
386 + | crate::operation::list_async_invokes::ListAsyncInvokesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
|
387 + | crate::operation::list_async_invokes::ListAsyncInvokesError::InternalServerException(inner) => Error::InternalServerException(inner),
|
388 + | crate::operation::list_async_invokes::ListAsyncInvokesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
389 + | crate::operation::list_async_invokes::ListAsyncInvokesError::ValidationException(inner) => Error::ValidationException(inner),
|
390 + | crate::operation::list_async_invokes::ListAsyncInvokesError::Unhandled(inner) => Error::Unhandled(inner),
|
391 + | }
|
392 + | }
|
393 + | }
|
394 + | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_async_invoke::StartAsyncInvokeError, R>> for Error
|
395 + | where
|
396 + | R: Send + Sync + std::fmt::Debug + 'static,
|
397 + | {
|
398 + | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_async_invoke::StartAsyncInvokeError, R>) -> Self {
|
399 + | match err {
|
400 + | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
401 + | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
402 + | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
403 + | source: err.into(),
|
404 + | }),
|
405 + | }
|
406 + | }
|
407 + | }
|
408 + | impl From<crate::operation::start_async_invoke::StartAsyncInvokeError> for Error {
|
409 + | fn from(err: crate::operation::start_async_invoke::StartAsyncInvokeError) -> Self {
|
410 + | match err {
|
411 + | crate::operation::start_async_invoke::StartAsyncInvokeError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
|
412 + | crate::operation::start_async_invoke::StartAsyncInvokeError::ConflictException(inner) => Error::ConflictException(inner),
|
413 + | crate::operation::start_async_invoke::StartAsyncInvokeError::InternalServerException(inner) => Error::InternalServerException(inner),
|
414 + | crate::operation::start_async_invoke::StartAsyncInvokeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
|
415 + | crate::operation::start_async_invoke::StartAsyncInvokeError::ServiceQuotaExceededException(inner) => {
|
416 + | Error::ServiceQuotaExceededException(inner)
|
417 + | }
|
418 + | crate::operation::start_async_invoke::StartAsyncInvokeError::ServiceUnavailableException(inner) => {
|
419 + | Error::ServiceUnavailableException(inner)
|
420 + | }
|
421 + | crate::operation::start_async_invoke::StartAsyncInvokeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
422 + | crate::operation::start_async_invoke::StartAsyncInvokeError::ValidationException(inner) => Error::ValidationException(inner),
|
423 + | crate::operation::start_async_invoke::StartAsyncInvokeError::Unhandled(inner) => Error::Unhandled(inner),
|
424 + | }
|
425 + | }
|
426 + | }
|
234 427 | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ConverseStreamOutputError, R>> for Error
|
235 428 | where
|
236 429 | R: Send + Sync + std::fmt::Debug + 'static,
|
237 430 | {
|
238 431 | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ConverseStreamOutputError, R>) -> Self {
|
239 432 | match err {
|
240 433 | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
241 434 | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
242 435 | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
243 436 | source: err.into(),
|
244 437 | }),
|
245 438 | }
|
246 439 | }
|
247 440 | }
|
248 441 | impl From<crate::types::error::ConverseStreamOutputError> for Error {
|
249 442 | fn from(err: crate::types::error::ConverseStreamOutputError) -> Self {
|
250 443 | match err {
|
251 444 | crate::types::error::ConverseStreamOutputError::InternalServerException(inner) => Error::InternalServerException(inner),
|
252 445 | crate::types::error::ConverseStreamOutputError::ModelStreamErrorException(inner) => Error::ModelStreamErrorException(inner),
|
253 446 | crate::types::error::ConverseStreamOutputError::ValidationException(inner) => Error::ValidationException(inner),
|
254 447 | crate::types::error::ConverseStreamOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
448 + | crate::types::error::ConverseStreamOutputError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
|
255 449 | crate::types::error::ConverseStreamOutputError::Unhandled(inner) => Error::Unhandled(inner),
|
256 450 | }
|
257 451 | }
|
258 452 | }
|
453 + | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InvokeModelWithBidirectionalStreamInputError, R>> for Error
|
454 + | where
|
455 + | R: Send + Sync + std::fmt::Debug + 'static,
|
456 + | {
|
457 + | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InvokeModelWithBidirectionalStreamInputError, R>) -> Self {
|
458 + | match err {
|
459 + | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
460 + | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
461 + | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
462 + | source: err.into(),
|
463 + | }),
|
464 + | }
|
465 + | }
|
466 + | }
|
467 + | impl From<crate::types::error::InvokeModelWithBidirectionalStreamInputError> for Error {
|
468 + | fn from(err: crate::types::error::InvokeModelWithBidirectionalStreamInputError) -> Self {
|
469 + | match err {
|
470 + | crate::types::error::InvokeModelWithBidirectionalStreamInputError::Unhandled(inner) => Error::Unhandled(inner),
|
471 + | }
|
472 + | }
|
473 + | }
|
474 + | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InvokeModelWithBidirectionalStreamOutputError, R>> for Error
|
475 + | where
|
476 + | R: Send + Sync + std::fmt::Debug + 'static,
|
477 + | {
|
478 + | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InvokeModelWithBidirectionalStreamOutputError, R>) -> Self {
|
479 + | match err {
|
480 + | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
481 + | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
482 + | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
483 + | source: err.into(),
|
484 + | }),
|
485 + | }
|
486 + | }
|
487 + | }
|
488 + | impl From<crate::types::error::InvokeModelWithBidirectionalStreamOutputError> for Error {
|
489 + | fn from(err: crate::types::error::InvokeModelWithBidirectionalStreamOutputError) -> Self {
|
490 + | match err {
|
491 + | crate::types::error::InvokeModelWithBidirectionalStreamOutputError::InternalServerException(inner) => {
|
492 + | Error::InternalServerException(inner)
|
493 + | }
|
494 + | crate::types::error::InvokeModelWithBidirectionalStreamOutputError::ModelStreamErrorException(inner) => {
|
495 + | Error::ModelStreamErrorException(inner)
|
496 + | }
|
497 + | crate::types::error::InvokeModelWithBidirectionalStreamOutputError::ValidationException(inner) => Error::ValidationException(inner),
|
498 + | crate::types::error::InvokeModelWithBidirectionalStreamOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
499 + | crate::types::error::InvokeModelWithBidirectionalStreamOutputError::ModelTimeoutException(inner) => Error::ModelTimeoutException(inner),
|
500 + | crate::types::error::InvokeModelWithBidirectionalStreamOutputError::ServiceUnavailableException(inner) => {
|
501 + | Error::ServiceUnavailableException(inner)
|
502 + | }
|
503 + | crate::types::error::InvokeModelWithBidirectionalStreamOutputError::Unhandled(inner) => Error::Unhandled(inner),
|
504 + | }
|
505 + | }
|
506 + | }
|
259 507 | impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>> for Error
|
260 508 | where
|
261 509 | R: Send + Sync + std::fmt::Debug + 'static,
|
262 510 | {
|
263 511 | fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>) -> Self {
|
264 512 | match err {
|
265 513 | ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
|
266 514 | _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
267 515 | meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
|
268 516 | source: err.into(),
|
269 517 | }),
|
270 518 | }
|
271 519 | }
|
272 520 | }
|
273 521 | impl From<crate::types::error::ResponseStreamError> for Error {
|
274 522 | fn from(err: crate::types::error::ResponseStreamError) -> Self {
|
275 523 | match err {
|
276 524 | crate::types::error::ResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
|
277 525 | crate::types::error::ResponseStreamError::ModelStreamErrorException(inner) => Error::ModelStreamErrorException(inner),
|
278 526 | crate::types::error::ResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
|
279 527 | crate::types::error::ResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
|
280 528 | crate::types::error::ResponseStreamError::ModelTimeoutException(inner) => Error::ModelTimeoutException(inner),
|
529 + | crate::types::error::ResponseStreamError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
|
281 530 | crate::types::error::ResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
|
282 531 | }
|
283 532 | }
|
284 533 | }
|
285 534 | impl ::std::error::Error for Error {
|
286 535 | fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
287 536 | match self {
|
288 537 | Error::AccessDeniedException(inner) => inner.source(),
|
538 + | Error::ConflictException(inner) => inner.source(),
|
289 539 | Error::InternalServerException(inner) => inner.source(),
|
290 540 | Error::ModelErrorException(inner) => inner.source(),
|
291 541 | Error::ModelNotReadyException(inner) => inner.source(),
|
292 542 | Error::ModelStreamErrorException(inner) => inner.source(),
|
293 543 | Error::ModelTimeoutException(inner) => inner.source(),
|
294 544 | Error::ResourceNotFoundException(inner) => inner.source(),
|
295 545 | Error::ServiceQuotaExceededException(inner) => inner.source(),
|
546 + | Error::ServiceUnavailableException(inner) => inner.source(),
|
296 547 | Error::ThrottlingException(inner) => inner.source(),
|
297 548 | Error::ValidationException(inner) => inner.source(),
|
298 549 | Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
|
299 550 | }
|
300 551 | }
|
301 552 | }
|
302 553 | impl ::aws_types::request_id::RequestId for Error {
|
303 554 | fn request_id(&self) -> Option<&str> {
|
304 555 | match self {
|
305 556 | Self::AccessDeniedException(e) => e.request_id(),
|
557 + | Self::ConflictException(e) => e.request_id(),
|
306 558 | Self::InternalServerException(e) => e.request_id(),
|
307 559 | Self::ModelErrorException(e) => e.request_id(),
|
308 560 | Self::ModelNotReadyException(e) => e.request_id(),
|
309 561 | Self::ModelStreamErrorException(e) => e.request_id(),
|
310 562 | Self::ModelTimeoutException(e) => e.request_id(),
|
311 563 | Self::ResourceNotFoundException(e) => e.request_id(),
|
312 564 | Self::ServiceQuotaExceededException(e) => e.request_id(),
|
565 + | Self::ServiceUnavailableException(e) => e.request_id(),
|
313 566 | Self::ThrottlingException(e) => e.request_id(),
|
314 567 | Self::ValidationException(e) => e.request_id(),
|
315 568 | Self::Unhandled(e) => e.meta.request_id(),
|
316 569 | }
|
317 570 | }
|
318 571 | }
|