Skip to content

Commit fd238ef

Browse files
author
David Hasani
committed
stopJob on failure
1 parent 375a2d6 commit fd238ef

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/core/src/codewhisperer/commands/startTransformByQ.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ export async function postTransformationJob() {
744744
export async function transformationJobErrorHandler(error: any) {
745745
if (!transformByQState.isCancelled()) {
746746
// means some other error occurred; cancellation already handled by now with stopTransformByQ
747+
await stopJob(transformByQState.getJobId())
747748
transformByQState.setToFailed()
748749
transformByQState.setPolledJobStatus('FAILED')
749750
// jobFailureErrorNotification should always be defined here

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ export async function stopJob(jobId: string) {
185185
return
186186
}
187187

188+
getLogger().info(`CodeTransformation: Stopping transformation job with ID: ${jobId}`)
189+
188190
try {
189191
await codeWhisperer.codeWhispererClient.codeModernizerStopCodeTransformation({
190192
transformationJobId: jobId,

0 commit comments

Comments
 (0)