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

Handle search max search term length #3152

Closed
doug-s-nava opened this issue Dec 9, 2024 · 0 comments · Fixed by #3554
Closed

Handle search max search term length #3152

doug-s-nava opened this issue Dec 9, 2024 · 0 comments · Fixed by #3554
Assignees

Comments

@doug-s-nava
Copy link
Collaborator

doug-s-nava commented Dec 9, 2024

Summary

There is a 100 character length maximum on the search term enforced on the API. Currently if a user enters a term longer than 100 characters the UI shows them a generic error. For better UX we should:

  • respond to the API error with a more specific error based on the error returned from the API
  • validate search term length with a max of 100 characters on the frontend and disallow search for terms that are too long

The error from the API response looks like this

Image

Acceptance criteria

  • respond to the API error with a more specific error based on the error returned from the API
  • validate search term length with a max of 100 characters on the frontend and disallow search for terms that are too long

More specific requirements around verbiage TBD

@mxk0 mxk0 moved this from Icebox to Todo in Simpler.Grants.gov Product Backlog Dec 26, 2024
@mxk0 mxk0 added refinement and removed frontend labels Dec 26, 2024
@doug-s-nava doug-s-nava moved this from Todo to In Progress in Simpler.Grants.gov Product Backlog Jan 16, 2025
@doug-s-nava doug-s-nava self-assigned this Jan 16, 2025
@mxk0 mxk0 removed the refinement label Jan 17, 2025
@doug-s-nava doug-s-nava moved this from In Progress to In Review in Simpler.Grants.gov Product Backlog Jan 17, 2025
doug-s-nava added a commit that referenced this issue Jan 22, 2025
)

* introduces client side validation of the query string size, and displays an error on submit click without submitting
* to handle a case where a request does go out from the client but returns with a validation error, error handling
system has been updated to pass relevant information to the client so that it can be handled
* fixes a bug that was preventing the search form state to be maintained in the case of an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants