Skip to content

chore: Add OpenAPI Support to emoji-custom.create API#36523

Merged
ggazzo merged 13 commits intoRocketChat:developfrom
ahmed-n-abdeltwab:feat/openapi-emoji-custom-create
Feb 24, 2026
Merged

chore: Add OpenAPI Support to emoji-custom.create API#36523
ggazzo merged 13 commits intoRocketChat:developfrom
ahmed-n-abdeltwab:feat/openapi-emoji-custom-create

Conversation

@ahmed-n-abdeltwab
Copy link
Copy Markdown
Contributor

@ahmed-n-abdeltwab ahmed-n-abdeltwab commented Jul 24, 2025

Description:
This PR integrates OpenAPI support into the Rocket.Chat API, migrate of Rocket.Chat API endpoints to the new OpenAPI pattern. The update includes improved API documentation, enhanced type safety, and response validation using AJV.

Key Changes:

  • Implemented the new pattern and added AJV-based JSON schema validation for API.
  • Uses the ExtractRoutesFromAPI utility from the TypeScript definitions to dynamically derive the routes from the endpoint specifications.
  • Enabled Swagger UI integration for this API.
  • This does not introduce any breaking changes to the endpoint logic.

Issue Reference:
Relates to #34983, part of the ongoing OpenAPI integration effort.

Testing:

  • Verified that the API response schemas are correctly documented in Swagger UI.
  • All tests passed without any breaking changes
$ yarn testapi -f '[EmojiCustom]'


  [EmojiCustom]
    [/emoji-custom.create]
(node:18800) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
      ✔ should create new custom emoji (91ms)
      ✔ should create new custom emoji without optional parameter "aliases" (97ms)
      ✔ should throw an error when the filename is wrong
    [/emoji-custom.update]
      successfully:
        ✔ should update the custom emoji without a file
        ✔ should update the custom emoji without optional parameter "aliases"
        ✔ should update the custom emoji with all parameters and with a file (93ms)
        ✔ should change the etag when the custom emoji image is updated (398ms)
      should throw error when:
        ✔ the fields does not include "_id"
        ✔ the custom emoji does not exists
        ✔ the emoji file field is wrong
    [/emoji-custom.list]
      ✔ should return emojis
      ✔ should return emojis when use "query" query parameter
      ✔ should return emojis when use "updateSince" query parameter
      ✔ should return emojis when use both, "updateSince" and "query" query parameter
      ✔ should return an error when the "updateSince" query parameter is a invalid date
    [/emoji-custom.all]
      ✔ should return emojis
      ✔ should return emojis even requested with count and offset params
    Accessing custom emojis
      ✔ should return forbidden if the there is no fileId on the url
      ✔ should return success if the file does not exists with some specific headers
      ✔ should return not modified if the file does not exists and if-modified-since is equal to the Thu, 01 Jan 2015 00:00:00 GMT
      ✔ should return success if the the requested exists
      ✔ should return not modified if the the requested file contains a valid-since equal to the upload date
      ✔ should return the emoji even when no etag is passed (for old emojis)
      ✔ should return success if the etag is invalid
    [/emoji-custom.delete]
      ✔ should throw an error when trying delete custom emoji without the required param "emojid"
      ✔ should throw an error when trying delete custom emoji that does not exists
      ✔ should delete the custom emoji created before successfully


  27 passing (1s)

Endpoints: (In progress)

Looking forward to your feedback! 🚀

Summary by CodeRabbit

  • New Features
    • OpenAPI-backed validation and structured responses for emoji creation, improving consistency.
  • Bug Fixes
    • Improved error handling for emoji creation with clearer, standardized error responses.
  • Documentation
    • Enhanced API docs for emoji creation with explicit request/response schemas.
  • Chores
    • Updated route and typing infrastructure to modern standards and shared schema usage.

Task: ARCH-1990

[COMM-144]

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Jul 24, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 24, 2025

🦋 Changeset detected

Latest commit: fe3f8f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/http-router Patch
@rocket.chat/models Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/livechat Patch
@rocket.chat/mock-providers Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch
@rocket.chat/ui-client Patch
@rocket.chat/media-calls Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/core-typings Patch
@rocket.chat/apps Patch
@rocket.chat/model-typings Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ahmed-n-abdeltwab
Copy link
Copy Markdown
Contributor Author

hey @cardoso the POST method lacks support for handling multipart/form-data payloads

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.62%. Comparing base (b77fe13) to head (fe3f8f2).
⚠️ Report is 100 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36523      +/-   ##
===========================================
- Coverage    70.65%   70.62%   -0.04%     
===========================================
  Files         3189     3189              
  Lines       112715   112715              
  Branches     20438    20452      +14     
===========================================
- Hits         79642    79604      -38     
- Misses       31028    31063      +35     
- Partials      2045     2048       +3     
Flag Coverage Δ
e2e 60.34% <ø> (-0.02%) ⬇️
e2e-api 47.79% <ø> (-1.04%) ⬇️
unit 71.19% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cardoso
Copy link
Copy Markdown
Member

cardoso commented Jul 24, 2025

@ahmed-n-abdeltwab can you fix that in this PR?

@ahmed-n-abdeltwab ahmed-n-abdeltwab force-pushed the feat/openapi-emoji-custom-create branch from 121790a to 9eb457f Compare July 25, 2025 14:47
@ahmed-n-abdeltwab ahmed-n-abdeltwab marked this pull request as ready for review July 28, 2025 15:46
@ahmed-n-abdeltwab ahmed-n-abdeltwab requested review from a team as code owners July 28, 2025 15:46
@ahmed-n-abdeltwab ahmed-n-abdeltwab marked this pull request as draft August 5, 2025 06:54
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 27, 2025

Walkthrough

Adds OpenAPI/AJV-backed handling for the emoji-custom.create route using chained route syntax, exposes the HTTP Request on handler this, moves the create endpoint typing into server-side route definitions with module augmentation, and removes the create typing from shared rest-typings.

Changes

Cohort / File(s) Summary
Route context typing
apps/meteor/app/api/server/definition.ts
Adds request: Request to TypedThis<TOptions, TPath> so route handlers receive the HTTP Request on their this context.
Emoji create route + public typings
apps/meteor/app/api/server/v1/emoji-custom.ts
Rewrites emoji-custom.create using chained route/action syntax with AJV/OpenAPI request & response schemas (200/400), wraps logic in try/catch and returns structured success/failure, and defines EmojiCustomCreateEndpoints/EmojiCustomEndpoints via ExtractRoutesFromAPI. Also augments @rocket.chat/rest-typings to include these endpoints.
Public REST typings adjustment
packages/rest-typings/src/v1/emojiCustom.ts
Removes the POST /v1/emoji-custom.create entry from shared EmojiCustomEndpoints; create endpoint typings now provided by server-side augmentation.
Changeset
.changeset/weak-terms-shave.md
Documents migration to chained route syntax and shared AJV schemas / OpenAPI support for emoji-custom.create.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API_Router as "API Router"
  participant Handler as "emoji-custom.create Handler"
  participant Validator as "Validator (AJV)"
  participant Emoji_Service as "Emoji Service"
  participant Storage_DB as "Storage/DB"

  Client->>API_Router: POST /v1/emoji-custom.create (payload)
  API_Router->>Handler: Invoke (handler.this.request available)
  Handler->>Validator: Validate request & response schema
  alt Valid
    Handler->>Emoji_Service: insertOrUpdateEmoji(metadata)
    Emoji_Service->>Storage_DB: Upsert metadata
    Storage_DB-->>Emoji_Service: OK
    Handler->>Emoji_Service: uploadEmojiCustomWithBuffer(file buffer)
    Emoji_Service->>Storage_DB: Store asset
    Storage_DB-->>Emoji_Service: OK
    Emoji_Service-->>Handler: Result
    Handler-->>API_Router: 200 { structured response }
    API_Router-->>Client: 200
  else Invalid or Error
    Handler-->>API_Router: 400 { failure payload }
    API_Router-->>Client: 400
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I twitched my whiskers at the new emoji gate,
Schemas lined up tidy, responses validate.
I hopped through routes with a joyful cheer,
AJV and types keep errors clear.
New faces sprout — I thump, delighted here! 🐇✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding OpenAPI support to the emoji-custom.create API endpoint through modern route definition and schema validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ahmed-n-abdeltwab ahmed-n-abdeltwab marked this pull request as ready for review September 30, 2025 03:20
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/meteor/app/api/server/v1/emoji-custom.ts (2)

158-171: Consider including error details in the failure response.

The catch block logs the error but returns a generic API.v1.failure() without any error message. This makes debugging difficult for API consumers. Consider passing error details to the failure response.

Apply this diff to include error context:

 		} catch (e) {
 			SystemLogger.error(e);
-			return API.v1.failure();
+			return API.v1.failure(e instanceof Error ? e.message : 'Failed to create emoji');
 		}

252-254: Consider the purpose of the EmojiCustomEndpoints alias.

The EmojiCustomEndpoints type is an alias to EmojiCustomCreateEndpoints, which only includes the create endpoint. This naming might be misleading since it suggests it covers all emoji-custom endpoints when it only covers one.

If the intent is to eventually include all emoji-custom endpoints in this type, consider:

  • Using a more specific name like EmojiCustomCreateEndpoint (singular), or
  • Documenting the planned expansion, or
  • Directly exporting EmojiCustomCreateEndpoints if the alias doesn't add clarity.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dca0b3a and 8e34d61.

📒 Files selected for processing (4)
  • .changeset/weak-terms-shave.md (1 hunks)
  • apps/meteor/app/api/server/definition.ts (1 hunks)
  • apps/meteor/app/api/server/v1/emoji-custom.ts (4 hunks)
  • packages/rest-typings/src/v1/emojiCustom.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/rest-typings/src/v1/emojiCustom.ts
🧰 Additional context used
🧬 Code graph analysis (1)
apps/meteor/app/api/server/v1/emoji-custom.ts (5)
packages/rest-typings/src/v1/Ajv.ts (1)
  • ajv (23-23)
apps/meteor/app/api/server/lib/getUploadFormData.ts (1)
  • getUploadFormData (55-195)
apps/meteor/app/api/server/ApiClass.ts (1)
  • ExtractRoutesFromAPI (73-77)
packages/rest-typings/src/v1/emojiCustom.ts (1)
  • EmojiCustomEndpoints (53-73)
packages/rest-typings/src/index.ts (1)
  • Endpoints (51-98)
🔇 Additional comments (6)
.changeset/weak-terms-shave.md (1)

1-7: LGTM!

The changeset correctly documents the OpenAPI support addition as patch-level changes for both affected packages. The description accurately summarizes the enhancement.

apps/meteor/app/api/server/v1/emoji-custom.ts (4)

4-4: LGTM!

The import additions for ajv and isEmojiCustomList are appropriate for the OpenAPI schema validation implementation.


14-14: LGTM!

The ExtractRoutesFromAPI import is correctly used for deriving route types from the endpoint specification.


138-146: Verify multipart/form-data Content-Type handling.

Per the PR comments, there's a concern about POST method support for multipart/form-data payloads. While getUploadFormData handles multipart parsing, verify that the OpenAPI specification documents the expected Content-Type: multipart/form-data header and that no middleware blocks it.

Consider adding explicit Content-Type validation or documentation in the OpenAPI schema to address the maintainer's concern about multipart/form-data handling.


256-259: LGTM!

The module augmentation correctly extends the @rocket.chat/rest-typings Endpoints interface. The eslint-disable comments are appropriate for this declaration merging pattern.

apps/meteor/app/api/server/definition.ts (1)

304-304: LGTM!

Adding the request: Request field to TypedThis aligns it with the existing ActionThis interface and enables typed access to the HTTP request in OpenAPI-style handlers. This change directly supports the emoji-custom.create endpoint implementation.

@ggazzo ggazzo added this to the 8.3.0 milestone Feb 24, 2026
@ggazzo ggazzo self-assigned this Feb 24, 2026
@ggazzo ggazzo changed the title feat: Add OpenAPI Support to emoji-custom.create API chore: Add OpenAPI Support to emoji-custom.create API Feb 24, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
apps/meteor/app/api/server/v1/emoji-custom.ts (1)

111-135: 400 response schema is still missing the message property.

With additionalProperties: false, any API.v1.failure() response that includes a message field will fail AJV validation. Add message: { type: 'string' } to the 400 schema properties.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/app/api/server/v1/emoji-custom.ts` around lines 111 - 135, The
400 response schema in emoji-custom.ts (the ajv.compile object under response:
400) disallows extra fields and is missing the message property, causing
API.v1.failure() responses with a message to fail validation; update the 400
schema properties to include message: { type: 'string' } so the AJV validation
accepts responses that include a message field while keeping
additionalProperties: false intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/meteor/app/api/server/v1/emoji-custom.ts`:
- Around line 158-171: The catch in the emoji upload handler swallows error
context (around insertOrUpdateEmoji and uploadEmojiCustomWithBuffer) by calling
API.v1.failure() with no details; change it to propagate the original error
information instead—either rethrow the caught error (throw err) so the framework
can enrich the response, or call API.v1.failure({ message: err.message ||
err.reason, errorType: err.error || 'error' }) so clients receive
message/errorType; keep SystemLogger.error({ err }) but do not suppress the
error payload from API responses.

---

Duplicate comments:
In `@apps/meteor/app/api/server/v1/emoji-custom.ts`:
- Around line 111-135: The 400 response schema in emoji-custom.ts (the
ajv.compile object under response: 400) disallows extra fields and is missing
the message property, causing API.v1.failure() responses with a message to fail
validation; update the 400 schema properties to include message: { type:
'string' } so the AJV validation accepts responses that include a message field
while keeping additionalProperties: false intact.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8e34d61 and fe3f8f2.

📒 Files selected for processing (2)
  • apps/meteor/app/api/server/definition.ts
  • apps/meteor/app/api/server/v1/emoji-custom.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/app/api/server/definition.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/app/api/server/v1/emoji-custom.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:06.802Z
Learning: In Rocket.Chat PR reviews, maintain strict scope boundaries—when a PR is focused on a specific endpoint (e.g., rooms.favorite), avoid reviewing or suggesting changes to other endpoints that were incidentally refactored (e.g., rooms.invite) unless explicitly requested by maintainers.
📚 Learning: 2026-01-17T01:51:47.764Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38219
File: packages/core-typings/src/cloud/Announcement.ts:5-6
Timestamp: 2026-01-17T01:51:47.764Z
Learning: In packages/core-typings/src/cloud/Announcement.ts, the AnnouncementSchema.createdBy field intentionally overrides IBannerSchema.createdBy (object with _id and optional username) with a string enum ['cloud', 'system'] to match existing runtime behavior. This is documented as technical debt with a FIXME comment at apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts:53 and should not be flagged as an error until the runtime behavior is corrected.

Applied to files:

  • apps/meteor/app/api/server/v1/emoji-custom.ts
📚 Learning: 2026-02-23T17:53:06.802Z
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:06.802Z
Learning: During PR reviews that touch endpoint files under apps/meteor/app/api/server/v1, enforce strict scope: if a PR targets a specific endpoint (e.g., rooms.favorite), do not propose changes to unrelated endpoints (e.g., rooms.invite) unless maintainers explicitly request them. Focus feedback on the touched endpoint's behavior, API surface, and related tests; avoid broad cross-endpoint changes in the same PR unless requested.

Applied to files:

  • apps/meteor/app/api/server/v1/emoji-custom.ts
🔇 Additional comments (2)
apps/meteor/app/api/server/v1/emoji-custom.ts (2)

4-4: LGTM! Imports are clean and aligned with the new AJV schema and type-extraction patterns introduced.

Also applies to: 14-14


251-259: Module augmentation pattern is well-structured.

The type extraction from the route definition and merging into @rocket.chat/rest-typings Endpoints via module augmentation is a clean approach for co-locating endpoint types with their implementation.

Comment on lines +158 to +171
try {
const emojiData = await insertOrUpdateEmoji(this.userId, {
...fields,
newFile: true,
aliases: fields.aliases || '',
name: fields.name,
extension: fields.extension,
});

await uploadEmojiCustomWithBuffer(this.userId, fileBuffer, mimetype, emojiData);
} catch (err) {
SystemLogger.error({ err });
return API.v1.failure();
}
await uploadEmojiCustomWithBuffer(this.userId, fileBuffer, mimetype, emojiData);
} catch (err) {
SystemLogger.error({ err });
return API.v1.failure();
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

catch block swallows error context — API consumers receive no diagnostic information.

API.v1.failure() at line 170 returns { success: false } with no message, error type, or details. If insertOrUpdateEmoji throws a meaningful Meteor.Error (e.g., duplicate emoji name), the client gets a bare failure with no way to understand what went wrong.

Compare with the emoji-custom.update endpoint (lines 226–230) that lets errors propagate to the framework, which enriches the response with error/errorType/message fields. The emoji-custom.delete endpoint (line 242) also forwards the message.

Consider forwarding the error message:

Proposed fix
 	} catch (err) {
 		SystemLogger.error({ err });
-		return API.v1.failure();
+		if (err instanceof Meteor.Error) {
+			return API.v1.failure(err.message);
+		}
+		return API.v1.failure('Failed to create emoji');
 	}

Note: if you forward error messages, the 400 response schema must also include message: { type: 'string' } in its properties (as flagged separately).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
try {
const emojiData = await insertOrUpdateEmoji(this.userId, {
...fields,
newFile: true,
aliases: fields.aliases || '',
name: fields.name,
extension: fields.extension,
});
await uploadEmojiCustomWithBuffer(this.userId, fileBuffer, mimetype, emojiData);
} catch (err) {
SystemLogger.error({ err });
return API.v1.failure();
}
await uploadEmojiCustomWithBuffer(this.userId, fileBuffer, mimetype, emojiData);
} catch (err) {
SystemLogger.error({ err });
return API.v1.failure();
}
try {
const emojiData = await insertOrUpdateEmoji(this.userId, {
...fields,
newFile: true,
aliases: fields.aliases || '',
name: fields.name,
extension: fields.extension,
});
await uploadEmojiCustomWithBuffer(this.userId, fileBuffer, mimetype, emojiData);
} catch (err) {
SystemLogger.error({ err });
if (err instanceof Meteor.Error) {
return API.v1.failure(err.message);
}
return API.v1.failure('Failed to create emoji');
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/app/api/server/v1/emoji-custom.ts` around lines 158 - 171, The
catch in the emoji upload handler swallows error context (around
insertOrUpdateEmoji and uploadEmojiCustomWithBuffer) by calling API.v1.failure()
with no details; change it to propagate the original error information
instead—either rethrow the caught error (throw err) so the framework can enrich
the response, or call API.v1.failure({ message: err.message || err.reason,
errorType: err.error || 'error' }) so clients receive message/errorType; keep
SystemLogger.error({ err }) but do not suppress the error payload from API
responses.

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Feb 24, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 24, 2026
@dionisio-bot dionisio-bot bot enabled auto-merge February 24, 2026 15:05
@ggazzo
Copy link
Copy Markdown
Member

ggazzo commented Feb 24, 2026

/jira ARCH-1935

@ggazzo ggazzo disabled auto-merge February 24, 2026 23:01
@ggazzo ggazzo merged commit 39f2e87 into RocketChat:develop Feb 24, 2026
50 checks passed
Kaustubh2k5 added a commit to Kaustubh2k5/Rocket.Chat that referenced this pull request Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants