Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/brave-ties-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rocket.chat/i18n': patch
'@rocket.chat/meteor': patch
---

fixes toast with empty error messages when a private app installation fails
5 changes: 3 additions & 2 deletions apps/meteor/ee/server/apps/communication/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ export class AppsRestApi {
}

if (!buff) {
return API.v1.failure({ error: 'Failed to get a file to install for the App. ' });
return API.v1.failure({ error: 'app_file_error', message: 'Failed to get a file to install for the App. ' });
}

// Used mostly in Cloud hosting for security reasons
Expand All @@ -400,11 +400,12 @@ export class AppsRestApi {
const info: IAppInfo & { status?: AppStatus } = aff.getAppInfo();

if (aff.hasStorageError()) {
return API.v1.failure({ status: 'storage_error', messages: [aff.getStorageError()] });
return API.v1.failure({ error: 'app_storage_error', status: 'storage_error', messages: [aff.getStorageError()] });
}

if (aff.hasAppUserError()) {
return API.v1.failure({
error: 'app_user_error',
status: 'app_user_error',
messages: [(aff.getAppUserError() as Record<string, any>).message],
payload: { username: (aff.getAppUserError() as Record<string, any>).username },
Expand Down
4 changes: 4 additions & 0 deletions packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,10 @@
"Apps_disabled_when_Premium_trial_ended_description_admin": "Community workspaces can enable up to 5 marketplace apps. Private apps can only be enabled in premium plans. Reenable the apps you require.",
"Apps_Engine_Version": "Apps Engine Version",
"Apps_Error_private_app_install_disabled": "Private app installation and updates are disabled in this workspace",
"Apps_Error_": "Unknown app error.",
"Apps_Error_app_file_error": "Failed to get a file to install for the App.",
"Apps_Error_app_storage_error": "Failed to save app file on storage.",
"Apps_Error_app_user_error": "Failed to create app user.",
"Apps_Essential_Alert": "This app is essential for the following events:",
"Apps_Essential_Disclaimer": "Events listed above will be disrupted if this app is disabled. If you want Rocket.Chat to work without this app's functionality, you need to uninstall it",
"Apps_Framework_Source_Package_Storage_Type": "Apps' Source Package Storage type",
Expand Down
Loading