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

Internal Server Error when searching with partial dates in Find a Record #3331

Closed
dikwickley opened this issue Dec 3, 2023 · 1 comment · Fixed by #3343
Closed

Internal Server Error when searching with partial dates in Find a Record #3331

dikwickley opened this issue Dec 3, 2023 · 1 comment · Fixed by #3343
Labels
help wanted Community contributors can implement this ready Ready for implementation type: bug Something isn't working work: backend Related to Python, Django, and simple SQL
Milestone

Comments

@dikwickley
Copy link

Description

Sometimes when partially entering the date in the Record Search Field, it randomly throws internal server errors.
Sometimes it throws the intended InvalidDateFormatAPIException but other times it UnboundLocalError.

Here is a recording of the behaviour:

Screen.Recording.2023-12-03.at.1.33.13.PM.mov

Also, it would be good UI/UX to show the user the date is invalid. In case when the user has just put an incorrect date time format and the server returns a 400 BAD REQUEST InvalidDateFormatAPIException. The user won't know as the table still shows the loading state.
image

Expected behavior

  • Server should not throw 500 internal server error and always throw InvalidDateFormatAPIException in case of wrong date format.
  • User should be conveyed if their input date is incorrect.

To Reproduce

Environment

  • OS: macOS
  • Browser: Chrome
  • Other info:

Additional context

@dikwickley dikwickley added status: triage type: bug Something isn't working labels Dec 3, 2023
@seancolsen seancolsen added work: backend Related to Python, Django, and simple SQL ready Ready for implementation and removed status: triage labels Dec 4, 2023
@seancolsen seancolsen added the help wanted Community contributors can implement this label Dec 4, 2023
@seancolsen
Copy link
Contributor

Thanks for reporting this, @dikwickley. Your video is very helpful.

Server should not throw 500 internal server error

Agreed. The scope of this ticket should be constrained to this API problem.

You've also described some UX problems. Those should be covered by #2327, which I imagine you might be interested in working on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Community contributors can implement this ready Ready for implementation type: bug Something isn't working work: backend Related to Python, Django, and simple SQL
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants