We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RequestRejection
@httpPayload
And the incoming value is not valid UTF-8. Indeed, consider:
@http(uri: "/http-payload-on-string", method: "POST") operation HttpPayloadOnStringOperation { input: HttpPayloadOnString } structure HttpPayloadOnString { @httpPayload message: String }
We generate:
pub(crate) fn de_message_payload( body: &[u8], ) -> std::result::Result< ::std::option::Option<::std::string::String>, ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection, > { (!body.is_empty()) .then(|| { let body_str = std::str::from_utf8(body)?; Ok(body_str.to_string()) }) .transpose() }
What RequestRejection do we yield? We're leveraging this #[from] conversion when using ? above:
#[from]
?
smithy-rs/rust-runtime/aws-smithy-http-server/src/protocol/rest_json_1/rejection.rs
Lines 150 to 151 in dcf16ac
Thus returning an incorrect rejection. We're not percent-decoding a URI here!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
And the incoming value is not valid UTF-8. Indeed, consider:
We generate:
What
RequestRejection
do we yield? We're leveraging this#[from]
conversion when using?
above:smithy-rs/rust-runtime/aws-smithy-http-server/src/protocol/rest_json_1/rejection.rs
Lines 150 to 151 in dcf16ac
Thus returning an incorrect rejection. We're not percent-decoding a URI here!
The text was updated successfully, but these errors were encountered: