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

ClausePresenter throws a NoMethodError when user tries to search a non-existant field #3441

Open
sandbergja opened this issue Nov 11, 2024 · 0 comments · May be fixed by #3442
Open

ClausePresenter throws a NoMethodError when user tries to search a non-existant field #3441

sandbergja opened this issue Nov 11, 2024 · 0 comments · May be fixed by #3442
Assignees

Comments

@sandbergja
Copy link
Contributor

Steps to recreate

  1. Start blacklight locally
  2. Go to http://localhost:3000/?clause[0][field]=not_a_real_field&clause[0][query]=cats
  3. Note that you get NoMethodError (undefined method 'display_label' for nil:NilClass)

Every other part of the stack is able to handle cases in which the field does not exist, I think that this class should match.

Alternatively, if we do want to throw an error in cases that the user tries to search a non-existant field, I think it should be a more intuitive error in a different part of the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant