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

raise a more informative NoMethodError for missing custom queries #873

Merged
merged 2 commits into from
Sep 20, 2021

Conversation

no-reply
Copy link
Contributor

the custom query container used to raise:

NoMethodError: undefined method 'new' for nil:NilClass`

this error doesn't do much to help callers figure out where they've gone
awry. the updated message includes:

  • the originally called method name
  • the list of available methods to call (as a kind of 'did you mean' feature)
  • reference to the idea that queries need to be registered

hopefully these are all helpful reminders in dubugging.

@no-reply no-reply force-pushed the better-no-method-error branch 2 times, most recently from 9783137 to c35d293 Compare September 20, 2021 22:58
tamsin johnson added 2 commits September 20, 2021 16:01
the custom query container used to raise:

    NoMethodError: undefined method 'new' for nil:NilClass`

this error doesn't do much to help callers figure out where they've gone
awry. the updated message includes:

  - the originally called method name
  - the list of available methods to call (as a kind of 'did you mean' feature)
  - reference to the idea that queries need to be registered

hopefully these are all helpful reminders in dubugging.
@tpendragon tpendragon merged commit f33a725 into main Sep 20, 2021
@tpendragon tpendragon deleted the better-no-method-error branch September 20, 2021 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants