Skip to content

Commit 91dfd69

Browse files
committed
WIP
1 parent bd8254f commit 91dfd69

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/server/worker/src/lib/executors/flow-job-executor.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { engineApiService } from '../api/server-api.service';
2525
import { engineRunner } from '../engine';
2626

2727
type EngineConstants = 'internalApiUrl' | 'publicUrl' | 'engineToken';
28+
const ENGINE_EXECUTION_ERROR_MESSAGE = 'Engine execution failed.';
2829

2930
async function prepareInput(
3031
flowVersion: FlowVersion,
@@ -129,9 +130,10 @@ async function executeFlow(
129130
}
130131

131132
const terminationReason =
132-
extractPropertyString(result, ['message']) || 'Engine execution failed.';
133+
extractPropertyString(result, ['message']) ||
134+
ENGINE_EXECUTION_ERROR_MESSAGE;
133135

134-
logger.info('Engine execution failed.', {
136+
logger.info(ENGINE_EXECUTION_ERROR_MESSAGE, {
135137
engineResponseStatus: status,
136138
flowRunStatus: result.status,
137139
terminationReason,
@@ -162,7 +164,7 @@ async function executeFlow(
162164
? 'Engine execution timed out.'
163165
: 'Flow execution encountered an internal error';
164166

165-
logger.info('Engine execution failed.', {
167+
logger.info(ENGINE_EXECUTION_ERROR_MESSAGE, {
166168
flowRunStatus: failedRunStatus,
167169
terminationReason,
168170
error: e,

0 commit comments

Comments
 (0)