From 91f17fb1764797e7d407fdf17b37225fab55bd34 Mon Sep 17 00:00:00 2001 From: matteoxplo <65158499+matteoxplo@users.noreply.github.com> Date: Wed, 4 Sep 2024 14:17:25 +0200 Subject: [PATCH] fix: Workflow always print "error:" even if there are none (#8978) Fix issue [https://github.com/medusajs/medusa/issues/8976](https://github.com/medusajs/medusa/issues/8976) --- packages/core/workflows-sdk/src/helper/workflow-export.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/workflows-sdk/src/helper/workflow-export.ts b/packages/core/workflows-sdk/src/helper/workflow-export.ts index c89e703657..dd56646efd 100644 --- a/packages/core/workflows-sdk/src/helper/workflow-export.ts +++ b/packages/core/workflows-sdk/src/helper/workflow-export.ts @@ -527,7 +527,9 @@ function attachOnFinishReleaseEvents( ) .join(EOL + separator + EOL) - logger.error(allWorkflowErrors) + if (allWorkflowErrors) { + logger.error(allWorkflowErrors) + } } await onFinish?.(args)