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

500 Error for invalid search parameters #1484

Open
lucasmarchd01 opened this issue May 28, 2024 · 0 comments
Open

500 Error for invalid search parameters #1484

lucasmarchd01 opened this issue May 28, 2024 · 0 comments
Assignees

Comments

@lucasmarchd01
Copy link
Contributor

lucasmarchd01 commented May 28, 2024

Following up on #1483, one of the main causes of 500 errors on our site is the use of invalid search parameters. These would only appear if the user is manually changing the value in the URL. For example:

https://cantusdatabase.org/source/620437/chants/?folio=104 will cause
Exception Type: ValueError
Exception Value: '104' is not in list

http://localhost/source/620437/chants/?feast=hello will cause
Exception Type: ValueError
Exception Value: Field 'id' expected a number but got 'hello'

We should include an exception block that checks for ValueError when retrieving search parameters anywhere on the site.

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

No branches or pull requests

1 participant