fix(core)!: Allow syntax errors and expression errors to fail executions (#6352)
* fix: Unify expression error behavior for v1 * fix: Add `package.json` to `tsconfig.build.json` * fix: Make `isFrontend` a constant * fix: Use CommonJS require to read version * fix: Use `JSON.parse()` and `fs.readFileSync()` * feat(editor): Make WF name a link on /executions (#6354) * make wf name a link in exec view * link color * make wf name a link in exec view * link color --------- Co-authored-by: Alex Grozav <alex@grozav.com> * fix: Try restoring inclusions in tsconfig files * fix: Try with copy * refactor: Switch base branch and remove global toggle * chore: Remove unrelated changes * chore: Restore lockfile * fix: Ensure all expression errors fail executions * uncaught ExpressionErrors should not fail e2e tests --------- Co-authored-by: romainminaud <romain.minaud@gmail.com> Co-authored-by: Alex Grozav <alex@grozav.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
committed by
कारतोफ्फेलस्क्रिप्ट™
parent
8c008f5d22
commit
1197811a1e
@@ -5,8 +5,6 @@ import { ExecutionBaseError } from './NodeErrors';
|
||||
* Class for instantiating an expression error
|
||||
*/
|
||||
export class ExpressionError extends ExecutionBaseError {
|
||||
clientOnly = false;
|
||||
|
||||
constructor(
|
||||
message: string,
|
||||
options?: {
|
||||
@@ -14,8 +12,6 @@ export class ExpressionError extends ExecutionBaseError {
|
||||
causeDetailed?: string;
|
||||
description?: string;
|
||||
descriptionTemplate?: string;
|
||||
failExecution?: boolean;
|
||||
clientOnly?: boolean; // whether to throw error only on frontend
|
||||
functionality?: 'pairedItem';
|
||||
itemIndex?: number;
|
||||
messageTemplate?: string;
|
||||
@@ -31,12 +27,6 @@ export class ExpressionError extends ExecutionBaseError {
|
||||
this.description = options.description;
|
||||
}
|
||||
|
||||
if (options?.clientOnly) {
|
||||
this.clientOnly = options.clientOnly;
|
||||
}
|
||||
|
||||
this.context.failExecution = !!options?.failExecution;
|
||||
|
||||
const allowedKeys = [
|
||||
'causeDetailed',
|
||||
'descriptionTemplate',
|
||||
@@ -58,9 +48,4 @@ export class ExpressionError extends ExecutionBaseError {
|
||||
}
|
||||
}
|
||||
|
||||
export class ExpressionExtensionError extends ExpressionError {
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
this.context.failExecution = true;
|
||||
}
|
||||
}
|
||||
export class ExpressionExtensionError extends ExpressionError {}
|
||||
|
||||
Reference in New Issue
Block a user