mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(HTTP Request Node): Cleanup circular references in response (#6590)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -14,15 +14,30 @@ import type {
|
||||
NodeParameterValueType,
|
||||
WorkflowExecuteMode,
|
||||
} from './Interfaces';
|
||||
import { ExpressionError } from './ExpressionError';
|
||||
import { ExpressionError, ExpressionExtensionError } from './ExpressionError';
|
||||
import { WorkflowDataProxy } from './WorkflowDataProxy';
|
||||
import type { Workflow } from './Workflow';
|
||||
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { extend, extendOptional } from './Extensions';
|
||||
import { extendedFunctions } from './Extensions/ExtendedFunctions';
|
||||
import { extendSyntax } from './Extensions/ExpressionExtension';
|
||||
import { isExpressionError, IS_FRONTEND, isSyntaxError, isTypeError } from './utils';
|
||||
|
||||
const IS_FRONTEND_IN_DEV_MODE =
|
||||
typeof process === 'object' &&
|
||||
Object.keys(process).length === 1 &&
|
||||
'env' in process &&
|
||||
Object.keys(process.env).length === 0;
|
||||
|
||||
const IS_FRONTEND = typeof process === 'undefined' || IS_FRONTEND_IN_DEV_MODE;
|
||||
|
||||
export const isSyntaxError = (error: unknown): error is SyntaxError =>
|
||||
error instanceof SyntaxError || (error instanceof Error && error.name === 'SyntaxError');
|
||||
|
||||
export const isExpressionError = (error: unknown): error is ExpressionError =>
|
||||
error instanceof ExpressionError || error instanceof ExpressionExtensionError;
|
||||
|
||||
export const isTypeError = (error: unknown): error is TypeError =>
|
||||
error instanceof TypeError || (error instanceof Error && error.name === 'TypeError');
|
||||
|
||||
// Set it to use double curly brackets instead of single ones
|
||||
tmpl.brackets.set('{{ }}');
|
||||
|
||||
Reference in New Issue
Block a user