<!-- Add the related story/sub-task/bug number, like Resolves#123, or
remove if NA -->
**Related issue:** Resolves#34239
<img width="1765" height="1146" alt="Screenshot 2025-10-16 at 12 11
39 PM"
src="https://github.com/user-attachments/assets/4735012d-6ddc-45cd-87a8-f92c9b7283b0"
/>
- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
Fixes#34010. Also switches the landing page on edit error to the labels
list from hosts filtered by the label, since the next step is likely
"delete the label and add it back."
<!-- Add the related story/sub-task/bug number, like Resolves#123, or
remove if NA -->
**Related issue:** Resolves #
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
## Testing
- [x] QA'd all new/changed functionality manually
For unreleased bug fixes in a release candidate, one of:
- [x] Confirmed that the fix is not expected to adversely impact load
test results