Skip to content
New issue

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

Panic when converting float to int #1235

Closed
wants to merge 1 commit into from

Conversation

david-perez
Copy link
Contributor

Motivation and Context

Description

Testing

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

github-actions bot commented Mar 3, 2022

A new doc preview is ready to view.

@github-actions
Copy link

github-actions bot commented Mar 3, 2022

A new generated diff is ready to view.

@david-perez
Copy link
Contributor Author

I noticed that we were lossily converting from floating to integer types in both the client and the server, and raised this PR to see if CI exercised the conversion. It does not (the only test that fails is the one I added), which is not good.

Is this intentional? There are HTTP malformed request tests that test that floating point values are rejected as integer values.

https://github.com/awslabs/smithy/blob/887ae4f6d118e55937105583a07deb90d8fabe1c/smithy-aws-protocol-tests/model/restJson1/malformedRequests/malformed-integer.smithy#L133-L106

@david-perez
Copy link
Contributor Author

This was fixed in #1274.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant