RocketChat / RocketChat/Rocket.Chat

Improve error handling: check installApp return value before proceeding to initialization

Open
#37,472 4 comments 0 reactions 1 assignee View on GitHub

@d-gubert is already working on this.

Since Nov 10, 2025.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Context

The installApp method in packages/apps-engine/src/server/AppManager.ts returns a Promise<boolean> to signal success or failure. When an exception occurs during installation, it returns false and sets the app status to ERROR_DISABLED.

However, in the add() function (around line 636), this return value is currently ignored, allowing the app to proceed to initializeApp or runStartUpProcess regardless of whether installation succeeded.

Problem

This behavior is inconsistent with error handling elsewhere in the class and may mask critical installation failures. The return value should be captured and failures should be handled appropriately—either by preventing app initialization/enablement or by explicitly documenting why errors are non-blocking.

Related

This issue was identified during code review but marked as out of scope for the original PR.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.