Alert notification form silently fails if label query invalid
Description of problem
When entering a Label query
in the Notification create/edit forms, the validation step works correctly in stopping you from entering an invalid query. However, it does not provide any message about what validation failed, or even that it failed, the page just flickers for a second while it reloads.
Expected behavior
There should be a message indicating why it failed to validate, e.g., Invalid label query
. Ideally we'd also link to the docs on creating label queries
Steps to reproduce
- Go to https://gracedb.ligo.org/alerts/notification/create/
- Fill out the description, select a contact, and then enter anything invalid in
Label query
(e.g.,f00b@r
) - Click submit
Context/environment
- OS: Arch Linux
- Browser: Firefox 112.0.1 (64-bit)
- Note: this was tested on gracedb-dev.ligo.org
Suggested solutions
We already seem to have validation messages for the Contacts
field on that page. We should just do whatever we did for that.