Skip to content

fix(search): Gracefully handle ValueErrors with search#147

Merged
samoehlert merged 10 commits intomainfrom
hotfix/search_500
Apr 14, 2025
Merged

fix(search): Gracefully handle ValueErrors with search#147
samoehlert merged 10 commits intomainfrom
hotfix/search_500

Conversation

@samoehlert
Copy link
Copy Markdown
Collaborator

Closes #31

We saw a 500 ValueError for two cases:

  • a search query with extraneous whitespace
  • a completely blank search query

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 11, 2025

File Coverage
All files 84%
config/consumers.py 78%
config/urls.py 69%
config/settings/base.py 70%
config/settings/local.py 73%
scram/route_manager/admin.py 85%
scram/route_manager/models.py 70%
scram/route_manager/views.py 88%
scram/route_manager/api/serializers.py 73%
scram/route_manager/api/views.py 83%
scram/templates/403.html 91%
scram/templates/404.html 91%
scram/templates/base.html 99%

Minimum allowed coverage is 50%

Generated by 🐒 cobertura-action against 3d24862

…ionality directly

we were sort of hacking around this by looking at entry detail for a specific ip instead of searching for it
it turns out they were testing the find_entries feature used in the API for deactivating routes
@samoehlert samoehlert marked this pull request as draft April 11, 2025 20:18
…ch queries

adds the required scaffolding like using the django test client for WUI stuff vs API
…invalid CIDR, but don't show a 400 error page
Comment thread scram/route_manager/tests/acceptance/features/search.feature Outdated
@samoehlert samoehlert marked this pull request as ready for review April 14, 2025 16:17
Copy link
Copy Markdown
Collaborator

@crankynetman crankynetman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@samoehlert samoehlert merged commit f09f3d8 into main Apr 14, 2025
21 of 22 checks passed
@samoehlert samoehlert deleted the hotfix/search_500 branch April 14, 2025 17:09
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

Successfully merging this pull request may close these issues.

Search breaks with leading space

3 participants