Skip to content

Commit fc6530d

Browse files
author
David Hasani
committed
fix timeout issue
1 parent f8b4b9f commit fc6530d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,13 @@ export async function runClientSideBuild(projectCopyDir: string, clientInstructi
872872
transformByQState.setJobFailureErrorNotification(
873873
`${CodeWhispererConstants.failedToCompleteJobGenericNotification} ${err.message}`
874874
)
875-
throw err
875+
// in case server-side execution times out, still call resumeTransformationJob
876+
if (err.message.includes('find a step in desired state:AWAITING_CLIENT_ACTION')) {
877+
getLogger().info('CodeTransformation: resuming job after server-side execution timeout')
878+
await resumeTransformationJob(transformByQState.getJobId(), 'COMPLETED')
879+
} else {
880+
throw err
881+
}
876882
} finally {
877883
await fs.delete(projectCopyDir, { recursive: true })
878884
await fs.delete(uploadZipDir, { recursive: true })

0 commit comments

Comments
 (0)