File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
apps/sim/app/api/workflows/[id]/execute Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -458,8 +458,6 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
458458 } )
459459 await loggingSession . markAsFailed ( timeoutErrorMessage )
460460
461- await cleanupExecutionBase64Cache ( executionId )
462-
463461 return NextResponse . json (
464462 {
465463 success : false ,
@@ -487,9 +485,6 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
487485
488486 const resultWithBase64 = { ...result , output : outputWithBase64 }
489487
490- // Cleanup base64 cache for this execution
491- await cleanupExecutionBase64Cache ( executionId )
492-
493488 const hasResponseBlock = workflowHasResponseBlock ( resultWithBase64 )
494489 if ( hasResponseBlock ) {
495490 return createHttpResponseFromBlock ( resultWithBase64 )
@@ -539,6 +534,13 @@ export async function POST(req: NextRequest, { params }: { params: Promise<{ id:
539534 )
540535 } finally {
541536 timeoutController . cleanup ( )
537+ if ( executionId ) {
538+ try {
539+ await cleanupExecutionBase64Cache ( executionId )
540+ } catch ( error ) {
541+ logger . error ( `[${ requestId } ] Failed to cleanup base64 cache` , { error } )
542+ }
543+ }
542544 }
543545 }
544546
You can’t perform that action at this time.
0 commit comments