From fb71324a53807b3a74adedef6c4a91e22d7644fe Mon Sep 17 00:00:00 2001 From: maxtkacz Date: Fri, 27 Aug 2021 17:25:54 +0200 Subject: [PATCH] :zap: Small tweaks to error and toast messages (#2142) Removed instances of "got" - aimed to make very small changes that arn't very stylistic/ opinionated just basic native english tweaks --- packages/core/src/Credentials.ts | 6 +++--- packages/core/src/NodeExecuteFunctions.ts | 4 ++-- packages/core/src/UserSettings.ts | 2 +- packages/editor-ui/src/views/NodeView.vue | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/core/src/Credentials.ts b/packages/core/src/Credentials.ts index b8c4d337fa..6f8f617694 100644 --- a/packages/core/src/Credentials.ts +++ b/packages/core/src/Credentials.ts @@ -68,7 +68,7 @@ export class Credentials extends ICredentials { try { return JSON.parse(decryptedData.toString(enc.Utf8)); } catch (e) { - throw new Error('Credentials could not be decrypted. The reason is that probably a different "encryptionKey" got used to encrypt the data than now to decrypt it.'); + throw new Error('Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.'); } } @@ -80,7 +80,7 @@ export class Credentials extends ICredentials { const fullData = this.getData(encryptionKey, nodeType); if (fullData === null) { - throw new Error(`No data got set.`); + throw new Error(`No data was set.`); } if (!fullData.hasOwnProperty(key)) { @@ -96,7 +96,7 @@ export class Credentials extends ICredentials { */ getDataToSave(): ICredentialsEncrypted { if (this.data === undefined) { - throw new Error(`No credentials got set to save.`); + throw new Error(`No credentials were set to save.`); } return { diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index 190acb4406..22dbc311bb 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -161,7 +161,7 @@ export async function requestOAuth2(this: IAllExecuteFunctions, credentialsType: const credentials = await this.getCredentials(credentialsType) as ICredentialDataDecryptedObject; if (credentials === undefined) { - throw new Error('No credentials got returned!'); + throw new Error('No credentials were returned!'); } if (credentials.oauthTokenData === undefined) { @@ -250,7 +250,7 @@ export async function requestOAuth1(this: IAllExecuteFunctions, credentialsType: const credentials = await this.getCredentials(credentialsType) as ICredentialDataDecryptedObject; if (credentials === undefined) { - throw new Error('No credentials got returned!'); + throw new Error('No credentials were returned!'); } if (credentials.oauthTokenData === undefined) { diff --git a/packages/core/src/UserSettings.ts b/packages/core/src/UserSettings.ts index 83fba72d65..13fce496f4 100644 --- a/packages/core/src/UserSettings.ts +++ b/packages/core/src/UserSettings.ts @@ -49,7 +49,7 @@ export async function prepareUserSettings(): Promise { userSettings.encryptionKey = randomBytes(24).toString('base64'); } - console.log(`UserSettings got generated and saved to: ${settingsPath}`); + console.log(`UserSettings were generated and saved to: ${settingsPath}`); return writeUserSettings(userSettings, settingsPath); } diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index a2178fb950..3199ffb55c 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -632,7 +632,7 @@ export default mixins( this.$showMessage({ title: 'Workflow created', - message: 'A new workflow got created!', + message: 'A new workflow was successfully created!', type: 'success', }); } else if ((e.key === 's') && (this.isCtrlKeyPressed(e) === true)) { @@ -912,7 +912,7 @@ export default mixins( await this.restApi().stopCurrentExecution(executionId); this.$showMessage({ title: 'Execution stopped', - message: `The execution with the id "${executionId}" got stopped!`, + message: `The execution with the id "${executionId}" was stopped!`, type: 'success', }); } catch (error) { @@ -957,8 +957,8 @@ export default mixins( } this.$showMessage({ - title: 'Webhook got deleted', - message: `The webhook got deleted!`, + title: 'Webhook deleted', + message: `The webhook was deleted successfully`, type: 'success', }); },