From e382730a39ef00c48161729c2f5c6c20cd33d7a2 Mon Sep 17 00:00:00 2001 From: Baptiste Devessier Date: Tue, 7 Oct 2025 18:25:51 +0200 Subject: [PATCH] Accept any json value in result and error (#14954) Some users might throw JS values that aren't strings. CleanShot 2025-10-07 at 17 48
36@2x Errors seen previously: image --- .../workflow-steps/components/WorkflowRunStepOutputDetail.tsx | 2 +- .../src/workflow/schemas/workflow-run-state-step-info-schema.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx index 38a34bfb5f..b7a4deab7a 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/components/WorkflowRunStepOutputDetail.tsx @@ -74,7 +74,7 @@ export const WorkflowRunStepOutputDetail = ({ stepId }: { stepId: string }) => { : i18n._(getActionHeaderTypeOrThrow(stepDefinition.definition.type)); const setRedHighlightingForEveryNode: GetJsonNodeHighlighting = (keyPath) => { - if (keyPath === 'error') { + if (keyPath.startsWith('error')) { return 'red'; } diff --git a/packages/twenty-shared/src/workflow/schemas/workflow-run-state-step-info-schema.ts b/packages/twenty-shared/src/workflow/schemas/workflow-run-state-step-info-schema.ts index beaa6622e3..2446ab141a 100644 --- a/packages/twenty-shared/src/workflow/schemas/workflow-run-state-step-info-schema.ts +++ b/packages/twenty-shared/src/workflow/schemas/workflow-run-state-step-info-schema.ts @@ -3,7 +3,7 @@ import { workflowRunStepStatusSchema } from './workflow-run-step-status-schema'; export const workflowRunStateStepInfoSchema = z.object({ result: z.any().optional(), - error: z.string().optional(), + error: z.any().optional(), status: workflowRunStepStatusSchema, get history() { return z