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

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

Closed
taylorthurlow opened this issue Oct 31, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@taylorthurlow
Copy link
Owner

This is from my own issue (collectiveidea/interactor#178) on the Interactor repo.


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.

@taylorthurlow taylorthurlow added the enhancement New feature or request label Oct 31, 2020
@taylorthurlow taylorthurlow added this to the 1.0 milestone Oct 31, 2020
@taylorthurlow taylorthurlow self-assigned this Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant