mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix: Disable errors obfuscation (no-changelog) (#10617)
This commit is contained in:
@@ -109,5 +109,3 @@ export const SINGLE_EXECUTION_NODES: { [key: string]: { [key: string]: NodeParam
|
||||
operation: [undefined], // default info
|
||||
},
|
||||
};
|
||||
|
||||
export const OBFUSCATED_ERROR_MESSAGE = 'Internal error';
|
||||
|
||||
@@ -890,7 +890,7 @@ type FunctionsBaseWithRequiredKeys<Keys extends keyof FunctionsBase> = Functions
|
||||
export type ContextType = 'flow' | 'node';
|
||||
|
||||
type BaseExecutionFunctions = FunctionsBaseWithRequiredKeys<'getMode'> & {
|
||||
continueOnFail(error?: Error): boolean;
|
||||
continueOnFail(): boolean;
|
||||
evaluateExpression(expression: string, itemIndex: number): NodeParameterValueType;
|
||||
getContext(type: ContextType): IContextObject;
|
||||
getExecuteData(): IExecuteData;
|
||||
|
||||
@@ -9,8 +9,6 @@ import { ApplicationError } from './application.error';
|
||||
export class NodeOperationError extends NodeError {
|
||||
type: string | undefined;
|
||||
|
||||
obfuscate: boolean = false;
|
||||
|
||||
constructor(
|
||||
node: INode,
|
||||
error: Error | string | JsonObject,
|
||||
@@ -20,13 +18,8 @@ export class NodeOperationError extends NodeError {
|
||||
return error;
|
||||
}
|
||||
|
||||
let obfuscateErrorMessage = false;
|
||||
|
||||
if (typeof error === 'string') {
|
||||
error = new ApplicationError(error);
|
||||
} else if (!(error instanceof ApplicationError)) {
|
||||
// this error was no processed by n8n, obfuscate error message
|
||||
obfuscateErrorMessage = true;
|
||||
}
|
||||
|
||||
super(node, error);
|
||||
@@ -35,11 +28,6 @@ export class NodeOperationError extends NodeError {
|
||||
error.messages.forEach((message) => this.addToMessages(message));
|
||||
}
|
||||
|
||||
if (obfuscateErrorMessage && !options.description) {
|
||||
const originalMessage = typeof error === 'string' ? error : (error.message as string);
|
||||
this.addToMessages(originalMessage);
|
||||
this.obfuscate = true;
|
||||
}
|
||||
if (options.message) this.message = options.message;
|
||||
if (options.level) this.level = options.level;
|
||||
if (options.functionality) this.functionality = options.functionality;
|
||||
|
||||
Reference in New Issue
Block a user