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

Handle empty input #11

Closed
psfinaki opened this issue Jul 25, 2017 · 1 comment
Closed

Handle empty input #11

psfinaki opened this issue Jul 25, 2017 · 1 comment
Assignees

Comments

@psfinaki
Copy link
Owner

Problem

Currently the service will throw because of let firstLetter = artist.[0] in the UrlMaker.

Ideas

Time to introduce some kind of validation to the service. Then, maybe, to the client as well.

@psfinaki
Copy link
Owner Author

psfinaki commented Aug 5, 2017

Now the error is generated at the service in the cases of null, empty or whitespace inputs.

For this, a new ErrorMessage called EmptyInput is introduced in the Result type. Validation itself is done in the new Validator module. It is well-tested in the ValidationTests module.

@psfinaki psfinaki closed this as completed Aug 5, 2017
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

No branches or pull requests

1 participant