validate the response body (e.g. with ajv) instead of casting it

Open
#43,561 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@swastiksharma45 is already working on this.

Since Nov 8, 2026.

  • #43594 by @swastiksharma45 — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
api, backend

Research direction

Start with the four response handling locations in packages/api-client/src/index.ts at lines 103, 143, 176, and 198. Read how each response body is currently cast and compare that with the expected response shapes; the issue suggests validating bodies, for example with ajv. Done means those locations validate response bodies instead of relying on casts.

Written by the indexing model from the issue text.

Description

todo type: feature
Dominant language
TypeScript
Stars
46.5k
Forks
14.1k
Avg merge
1d 21h
Merged PRs (30d)
381

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from RocketChat/Rocket.Chat

All issues in RocketChat/Rocket.Chat

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.