From 0e439c18a069c8b2b8eeb3de914ed5c60c1e7d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 20 Apr 2022 17:54:35 +0200 Subject: [PATCH] :zap: Adjust error message --- packages/cli/src/CredentialTypes.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/CredentialTypes.ts b/packages/cli/src/CredentialTypes.ts index 8234d0bc55..eceeb35fed 100644 --- a/packages/cli/src/CredentialTypes.ts +++ b/packages/cli/src/CredentialTypes.ts @@ -3,6 +3,7 @@ import { ICredentialTypeData, ICredentialTypes as ICredentialTypesInterface, } from 'n8n-workflow'; +import { RESPONSE_ERROR_MESSAGES } from './constants'; class CredentialTypesClass implements ICredentialTypesInterface { credentialTypes: ICredentialTypeData = {}; @@ -19,7 +20,7 @@ class CredentialTypesClass implements ICredentialTypesInterface { try { return this.credentialTypes[credentialType].type; } catch (error) { - throw new Error(`Failed to find credential type: ${credentialType}`); + throw new Error(`${RESPONSE_ERROR_MESSAGES.NO_CREDENTIAL}: ${credentialType}`); } } }