Skip to content

ResponseFactory::build and handling invalid input #66

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
johnny-bit opened this issue Jan 11, 2019 · 1 comment
Closed

ResponseFactory::build and handling invalid input #66

johnny-bit opened this issue Jan 11, 2019 · 1 comment
Labels

Comments

@johnny-bit
Copy link
Collaborator

While writing test for pull #65 I wondered about ResponseFactory::build and it's handling of invalid input.

Incorrect input is set to return string with whole input. Shouldn't we handle it by either returning false (1st error condition), throwing exception (2nd) or creating fake response with unsuccessful state (3rd)?

I'd be for handling it as 1 or 2, would signal clearer error ;) fake response would be a bit more to chew :)

@johnny-bit
Copy link
Collaborator Author

When writting #85 I thought about it and I think returning string is OK

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant