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

Ask a question form should gracefully handle invalid query params #3945

Open
rladdusaw opened this issue Jan 23, 2024 · 0 comments
Open

Ask a question form should gracefully handle invalid query params #3945

rladdusaw opened this issue Jan 23, 2024 · 0 comments
Assignees

Comments

@rladdusaw
Copy link
Contributor

Expected behavior

If I pass a value for the query param 'feedback_form' that does not match one of the forms the application will handle it without an error.

Actual behavior

We see an error page

Steps to replicate

Visit https://catalog.princeton.edu/ask_a_question?ask_a_question_form=Array%27

Impact of this bug

We get an error if something unexpected is passed to Orangelight

Honeybadger link and code snippet, if applicable

Link: https://app.honeybadger.io/projects/54399/faults/103854661

NoMethodError: undefined method `permit' for "Array'":String params.require(:ask_a_question_form).permit(:id, :title) ^^^^^^^</div>
55 |  
56 | def question_form_params
57 | params.require(:ask_a_question_form).permit(:id, :title)
58 | end

Implementation notes, if any

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

No branches or pull requests

2 participants