RocketChat / RocketChat/Rocket.Chat

[BUG] Internal error code exposed when email or username already exists during user creation

Open
#37,992 8 comments 1 reaction 0 assignees View on GitHub

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:
  1. Go to 'Administration → Users'
  2. Click on 'New user'
  3. Enter an email address that already exists
  4. OR enter a username that already exists
  5. 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.

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.