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

Allow JSON Response to Return Boolean false Value #383

Merged

Conversation

DomParfitt
Copy link
Contributor

Currently the implementation will fail to validate responses that return a simple JSON boolean value in the case where the value returned is false.

This is due to a check in the response validator to see if the body of a response exists and returns a 500 response if it does not, which currently uses a shorthand check for the existence of the response body. As a result if the response body is set to a simple false value it is treated as if the body does not exist.

Copy link
Owner

@cdimascio cdimascio left a comment

Choose a reason for hiding this comment

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

thanks @DomParfitt

@cdimascio
Copy link
Owner

@all-contributors add @DomParfitt for code and test

@cdimascio cdimascio merged commit dec510e into cdimascio:master Oct 2, 2020
@allcontributors
Copy link
Contributor

@cdimascio

I've put up a pull request to add @DomParfitt! 🎉

@cdimascio
Copy link
Owner

@DomParfitt your fix is in v4.0.6

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

Successfully merging this pull request may close these issues.

None yet

2 participants