Skip to content

Commit 32e3752

Browse files
author
David Hasani
committed
stopJob on failure
1 parent 720dad0 commit 32e3752

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
@@ -736,6 +736,7 @@ export async function postTransformationJob() {
736736
export async function transformationJobErrorHandler(error: any) {
737737
if (!transformByQState.isCancelled()) {
738738
// means some other error occurred; cancellation already handled by now with stopTransformByQ
739+
await stopJob(transformByQState.getJobId())
739740
transformByQState.setToFailed()
740741
transformByQState.setPolledJobStatus('FAILED')
741742
// 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)