diff --git a/core/src/main/java/io/kestra/core/runners/Worker.java b/core/src/main/java/io/kestra/core/runners/Worker.java index 1860e81c843..097fe813ca9 100644 --- a/core/src/main/java/io/kestra/core/runners/Worker.java +++ b/core/src/main/java/io/kestra/core/runners/Worker.java @@ -383,6 +383,11 @@ private WorkerTaskResult run(WorkerTask workerTask, Boolean cleanUp) throws Queu .withState(State.Type.FAILED) ); WorkerTaskResult workerTaskResult = new WorkerTaskResult(finalWorkerTask, dynamicWorkerResults); + RunContext runContext = workerTask + .getRunContext() + .forWorker(this.applicationContext, workerTask); + + runContext.logger().error("Exception while trying to emit the worker task result to the queue", e); this.workerTaskResultQueue.emit(workerTaskResult); return workerTaskResult; } finally {