Skip to content

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

@debosmita-S

Description

@debosmita-S

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]
[email protected] 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions