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

Reintroduce validation removed in video 378 #7

Open
wants to merge 1 commit into
base: spring-webclient
Choose a base branch
from

Conversation

johnsgp
Copy link

@johnsgp johnsgp commented Nov 15, 2019

The video is called "Going Reactive with Spring WebClient" and as part of making the code reactive, the validation of null and zero limits has been removed. While this is not strictly necessary to show how the reactive code works, I thought it was potentially confusing as it might imply that reactive code can't do validation as easily as non-reactive code.

In addition, I'm also catching NumberFormatException which wasn't done in the original and which would result in an unnecessary error when it could easily be averted with a default to a limit of 10. This would happen, for example, if letters were used in the input instead of numbers. It could be argued that this should result in an exception. It would also happen if the limit were left blank.

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