Skip to content

Friendly error message when calling interactor with non-hash arguments #178

Description

@taylorthurlow

If I call an interactor like so:

MyInteractor.call(something)

rather than the correct:

MyInteractor.call(something: "something")

Then I get a semi-cryptic error like:

NoMethodError:
       undefined method `each_pair' for #<MyInteractor:0x00007fa2fc407350>

It's pretty easy to see that I just called the interactor incorrectly, but it seems like it would be easy to check the provided parameters and raise a helpful error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions