fix: Make sure errors are transferred correctly from js task runner (no-changelog) (#11214)

This commit is contained in:
Tomi Turtiainen
2024-10-10 21:01:38 +03:00
committed by GitHub
parent 4e78c46a74
commit 1078fa662a
16 changed files with 311 additions and 122 deletions

View File

@@ -1,4 +1,4 @@
import { ApplicationError, ensureError } from 'n8n-workflow';
import { ApplicationError } from 'n8n-workflow';
import { nanoid } from 'nanoid';
import { URL } from 'node:url';
import { type MessageEvent, WebSocket } from 'ws';
@@ -256,8 +256,7 @@ export abstract class TaskRunner {
try {
const data = await this.executeTask(task);
this.taskDone(taskId, data);
} catch (e) {
const error = ensureError(e);
} catch (error) {
this.taskErrored(taskId, error);
}
}