fix: empty "Apps_Error_" toast message when private app installation fails (#35189)

pull/35174/head^2
Pierre Lehnen 11 months ago committed by GitHub
parent c55f44d58d
commit beec5663fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      .changeset/brave-ties-shout.md
  2. 5
      apps/meteor/ee/server/apps/communication/rest.ts
  3. 4
      packages/i18n/src/locales/en.i18n.json

@ -0,0 +1,6 @@
---
'@rocket.chat/i18n': patch
'@rocket.chat/meteor': patch
---
fixes toast with empty error messages when a private app installation fails

@ -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
@ -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 },

@ -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",

Loading…
Cancel
Save