-
Notifications
You must be signed in to change notification settings - Fork 245
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
fix: poor error message on scalar deserialization type mismatch #1187
Conversation
When deserializing a scalar (string, boolean, number, ...), and receiving a value that is not a scalar, the error message would not mention waht kind of scalar value was required, making the message less useful than it could be. Used the description of the type reference in the error message so that the specific scalar type is direction mentioned in the error message there. The description of the incorrect value that was received remains unchanged (typically the JSON representation of the value), and may be improved in a subsequent change.
@@ -53,7 +53,6 @@ | |||
"jest": { | |||
"collectCoverage": true, | |||
"collectCoverageFrom": [ | |||
"**/bin/**/*.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because there is no bin
in there anymore :)
yarn.lock
Outdated
"@types/xmldom@^0.1.29": | ||
version "0.1.29" | ||
resolved "https://registry.yarnpkg.com/@types/xmldom/-/xmldom-0.1.29.tgz#c4428b0ca86d3b881475726fd94980b38a27c381" | ||
integrity sha1-xEKLDKhtO4gUdXJv2UmAs4onw4E= | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was previously introduced by error but is no longer depended on. It's unrelated to the change at hand, but it's small enough I don't mind bundling.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a "before" and "after" example message to the PR description.
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
When deserializing a scalar (string, boolean, number, ...), and receiving a value that is not
a scalar, the error message would not mention what kind of scalar value was required, making
the message less useful than it could be.
Used the description of the type reference in the error message so that the specific scalar
type is direction mentioned in the error message there. The description of the incorrect
value that was received remains unchanged (typically the JSON representation of the value),
and may be improved in a subsequent change.
Improves the situation identified in #1182, however does not fix the whole problem.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.