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 :)
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 :)