bug: Changing emoji name to an existing one causes an internal error
Created by: Amelia
💡 Summary
changing an emoji's name to an already taken name causes an internal server error
🥰 Expected Behavior
when the situation occurs it should give a useful error having a dialog that shows both versions would be amazing
🤬 Actual Behavior
Endpoint: admin/emoji/update
Info: {"e":{"message":"name already exists","code":"Error","id":"4c38ea0f-8916-40e2-974e-17cd3e1f4971"}}
Date: 2023-09-26T16:13:14.516Z
📝 Steps to Reproduce
- have an emoji with an existing name
- change another emoji to the same name
📌 Environment
https://ambrosia.moe running on commit 586ec6e7
💻 Frontend
- Model and OS of the device(s): Arch Linux
- Browser: Firefox 115.0.2 (64-bit) (Flatpak)
- Server URL: ambrosia.moe
🛰 Backend (for server admin)
- Installation Method or Hosting Service: systemd
- Node: v19.90
- PostgreSQL: docker i forgor how to check version
- Redis: docker
- OS and Architecture: Debian 11