RocketChat / RocketChat/Rocket.Chat

Defining a user readable message instead of throwing a raw error .

Open
#38,500 6 comments 0 reactions 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:

In the manage - > workspace -> import -> import new file -> import file type select as slacks user csv -> then upload a pdf which is wrong and it is
throwing raw error , which is not readable to user.

Steps to reproduce:
  1. Go to manage
  2. Click on workspace
  3. Go to Import
  4. Click on Import new File button
  5. Select import file type as slacks user csv
  6. Select File type as upload
  7. Select a pdf file
  8. Then click on import
  9. See the error message through alert.
Expected behavior:

User should get alert like you have uploaded a wrong format which is not acceptable or like Invalid file type

Actual behavior:

In alert it is reading the pdf file and raw file is showing as message , which means it breaks the code .

Server Setup Information:
  • Version of Rocket.Chat Server: 8.1.0-develop
  • License Type:
  • Number of Users:
  • Operating System: ubantu 24 LTS wsl
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version: 22.18.0 - x64
  • MongoDB Version:7.0.16
Client Setup Information
  • Desktop App or Browser Version: Browser Version
  • Operating System: Linux
Additional context

I am attaching the error screenshot for reference .

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

Reproduce the issue through Manage > Workspace > Import > Import new File using the Slack user CSV option, then upload a PDF. Trace the alert and file-type validation path to find where the raw error is exposed. Done means an invalid upload shows a readable invalid-file-type message instead of the raw error.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.