@@ -25,6 +25,7 @@ import { engineApiService } from '../api/server-api.service';
2525import { engineRunner } from '../engine' ;
2626
2727type EngineConstants = 'internalApiUrl' | 'publicUrl' | 'engineToken' ;
28+ const ENGINE_EXECUTION_ERROR_MESSAGE = 'Engine execution failed.' ;
2829
2930async 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