This is a very minor bug, sort of an edge case, but hitting a 404 is never pleasant as it triggers a “did I do something wrong?” when managing a website.
Changing a tag name and reverting it to a previous tag name choice on the same screen (meaning, without reloading the page) causes a 404 error.
If you change a tag name at least once and end up choosing any tag name you previously validated on the same screen (or the original name), Discourses requests a wrong /tag/<tag_name>/notifications route using an unused tag_name, which results in a 404 error.
Reproduction steps:
Open an existing tag page: https://your-discourse.com/tag/a
Click the wrench, change the name and validate
(optional) change the name again
Revert the name to one of the previous ones (or the original tag name)