refactor(core): Switch plain errors in cli to ApplicationError (#7857)
Ensure all errors in `cli` are `ApplicationError` or children of it and contain no variables in the message, to continue normalizing all the errors we report to Sentry Follow-up to: https://github.com/n8n-io/n8n/pull/7839
This commit is contained in:
@@ -10,7 +10,7 @@ import Container, { Service } from 'typedi';
|
||||
|
||||
import { Logger } from '@/Logger';
|
||||
|
||||
import { jsonParse, type IDataObject } from 'n8n-workflow';
|
||||
import { jsonParse, type IDataObject, ApplicationError } from 'n8n-workflow';
|
||||
import {
|
||||
EXTERNAL_SECRETS_INITIAL_BACKOFF,
|
||||
EXTERNAL_SECRETS_MAX_BACKOFF,
|
||||
@@ -90,7 +90,7 @@ export class ExternalSecretsManager {
|
||||
try {
|
||||
return jsonParse(decryptedData);
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
throw new ApplicationError(
|
||||
'External Secrets Settings could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user