Skip to content

ResponseFactory::build and handling invalid input #66

Closed
@johnny-bit

Description

@johnny-bit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions