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

[Bug] Fix issue with incorrect 0 -> '' conversion in HTTP responses #1332

Merged
merged 3 commits into from Feb 15, 2022

Conversation

trsrm
Copy link
Contributor

@trsrm trsrm commented Feb 10, 2022

Description

If invokeResults.Payload === 0, then it gets replaced by empty string '', which causes buggy behavior in many cases.

Motivation and Context

Example case:
We have a lambda that returns a number of upvotes for a post.
So, when it returns 0, then HTTP response contains '' (empty string) instead.

How Has This Been Tested?

Manual testing (nothing should be broken).

Screenshots (if appropriate):

Screenshot

If invokeResults.Payload === 0, then it was replaced by empty string, 
which caused buggy behavior. 

Example case: 
We have a lambda that returns a number of upvotes for a post. 
So, when it returned 0, then HTTP response contained '' (empty string) instead.
Copy link
Collaborator

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @trsrm. I trust it's the right fix

@medikoo
Copy link
Collaborator

medikoo commented Feb 15, 2022

@trsrm there's a CLI fail related to file formatting. Can you fix that?

@trsrm trsrm requested a review from medikoo February 15, 2022 10:57
Copy link
Collaborator

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trsrm there are still issues

@trsrm trsrm requested a review from medikoo February 15, 2022 17:52
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.

None yet

2 participants