RocketChat / RocketChat/Rocket.Chat
[BUG] Internal error code exposed when email or username already exists during user creation
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 new user from the Admin panel, Rocket.Chat shows an internal error key ([error-field-unavailable]) instead of a user-friendly message if the email or username already exists.
This exposes an internal error identifier to the UI and causes confusion for administrators.
Steps to reproduce:
- Go to 'Administration → Users'
- Click on 'New user'
- Enter an email address that already exists
- OR enter a username that already exists
- Submit the form
Expected behavior:
A clear, human-readable validation message should be shown, for example:
- “Email address already exists”
- “Username already exists”
Actual behavior:
The UI displays an internal error message such as:
miraS is already in use :( [error-field-unavailable]
mirasen@gmail.com is already in use :( [error-field-unavailable]
(See attached screenshots)
Server Setup Information:
- Version of Rocket.Chat Server: latest (Docker)
- License Type: Starter
- Number of Users: 2
- Operating System: Windows
- Deployment Method: Docker Compose
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled (default docker setup)
- NodeJS Version: Bundled with Docker image
- MongoDB Version: Docker image default
Client Setup Information
- Desktop App or Browser Version: Chrome (latest)
- Operating System: Windows
Additional context
This appears to be an error-mapping or UI validation issue where backend error identifiers are directly surfaced in the UI instead of translated messages.
This impacts admin UX during user creation.
Relevant logs:
No crash logs observed.
Issue appears to be related to frontend error handling / message mapping.
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 in the Administration → Users → New user flow and reproduce the duplicate-email and duplicate-username cases described in the issue. Trace the frontend error mapping that displays the backend identifier, then verify that each case shows a clear human-readable validation message instead of [error-field-unavailable].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100