Repository navigation
Conversation
REST errors keep their bracketed code in the alert and DDP errors have no data, so the alert is blank. The helper now reads the error code and text from either shape, shows the translation when the app has one for the code, and otherwise shows the server's text without the bracketed code.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
Rohit3523
requested a deployment
to
approve_e2e_testing
October 9, 2026 16:46 — with
GitHub Actions
Waiting
Rohit3523
requested a deployment
to
android_build
October 9, 2026 16:49 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
showErrorAlertWithEMessageonly reade.data.errorand showed it as is. That goes wrong in two ways:User not found [error-user-not-found].data, so the message is undefined and the alert is blank.The helper now reads the error code (
data.errorTypeon REST, a stringerroron DDP) and the text (data.error, thenreason, thenmessage):[code]suffixreason, or themessagewithout the suffixreason[error-too-many-requests]The server throws
new Meteor.Error('<code>', '<English reason>')and never translates the reason, and the app'sen.jsonhas only a few of those codes (error-not-allowed,error-action-not-allowed). So a code is used only when the app has a translation for it. Otherwise the server's English text is shown, never the raw code.Issue(s)
Follow-up to #7783, where this came up in review. No ticket yet.
How to test or reproduce
pnpm test app/lib/methods/helpers/__tests__/info.test.ts[error-...]suffix. Where the app has a translation for the code, it is shown translated.Not yet verified on a device or against a live server.
Screenshots
No UI change beyond the alert text.
Types of changes
Checklist
Further comments
[code]suffix changes the text of the alerts the three existing callers show (StatusView,NotificationPreferencesView,PushGatewayConnection).reason/messagefallback to this function, so whichever of the two merges second needs a small rebase ininfo.ts.server/api/ApiClass.ts,server/meteor-methods/rooms/addUsersToRoom.ts), not against a live request..github/scripts/__tests__/changed-runner.test.js(missing-maestro guard), which fails on machines that havemaestroon thePATHand is unrelated to this change.