RocketChat / RocketChat/Rocket.Chat
Duplicate custom emoji creation does not display error message
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description
When creating a custom emoji with a name or alias that is already in use, the UI does not show an error message. The action appears to silently fail, leaving the administrator confused about why the emoji was not saved.
Steps to Reproduce
- Go to Administration → Custom Emojis.
- Create a custom emoji named
cat. - Try to create another emoji with the same name
cat. - Upload any image and click Save.
Expected Behavior
A red toast message should appear:
The modal should remain open so the administrator can correct the input.
Actual Behavior
No error feedback is displayed. The modal may close or simply do nothing, with no indication of why the creation failed.
Technical Findings
The emoji-custom.create endpoint catches the Meteor.Error but returns a generic failure() response, which removes the specific error information.
Additionally, the client-side useEndpointUploadMutation hook only displays the HTTP status by default and does not extract the detailed error message from the response body.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the emoji-custom.create endpoint and the client-side useEndpointUploadMutation hook described in the technical findings. Trace how duplicate-name errors move from the endpoint to the upload response, then verify that the UI shows the specific error and keeps the modal open so the administrator can correct the input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100