feat: return result.interpretationInfo from executeRun
This commit is contained in:
@@ -245,23 +245,25 @@ async function createWorkflowAndStoreMetadata(id: string, userId: string) {
|
||||
|
||||
async function readyForRunHandler(browserId: string, id: string) {
|
||||
try {
|
||||
const interpretation = await executeRun(id);
|
||||
const result = await executeRun(id);
|
||||
|
||||
if (interpretation) {
|
||||
if (result && result.success) {
|
||||
logger.log('info', `Interpretation of ${id} succeeded`);
|
||||
return result.interpretationInfo;
|
||||
} else {
|
||||
logger.log('error', `Interpretation of ${id} failed`);
|
||||
await destroyRemoteBrowser(browserId);
|
||||
return null;
|
||||
}
|
||||
|
||||
resetRecordingState(browserId, id);
|
||||
|
||||
} catch (error: any) {
|
||||
logger.error(`Error during readyForRunHandler: ${error.message}`);
|
||||
await destroyRemoteBrowser(browserId);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function resetRecordingState(browserId: string, id: string) {
|
||||
browserId = '';
|
||||
id = '';
|
||||
|
||||
Reference in New Issue
Block a user