diff --git a/packages/core/src/codewhisperer/commands/startTransformByQ.ts b/packages/core/src/codewhisperer/commands/startTransformByQ.ts index 089eadd5ba1..41a112087f2 100644 --- a/packages/core/src/codewhisperer/commands/startTransformByQ.ts +++ b/packages/core/src/codewhisperer/commands/startTransformByQ.ts @@ -718,8 +718,12 @@ export async function finalizeTransformationJob(status: string) { if (!(status === 'COMPLETED' || status === 'PARTIALLY_COMPLETED')) { getLogger().error(`CodeTransformation: ${CodeWhispererConstants.failedToCompleteJobNotification}`) jobPlanProgress['transformCode'] = StepProgress.Failed - transformByQState.setJobFailureErrorNotification(CodeWhispererConstants.failedToCompleteJobNotification) - transformByQState.setJobFailureErrorChatMessage(CodeWhispererConstants.failedToCompleteJobChatMessage) + if (!transformByQState.getJobFailureErrorNotification()) { + transformByQState.setJobFailureErrorNotification(CodeWhispererConstants.failedToCompleteJobNotification) + } + if (!transformByQState.getJobFailureErrorChatMessage()) { + transformByQState.setJobFailureErrorChatMessage(CodeWhispererConstants.failedToCompleteJobChatMessage) + } throw new Error('Job was not successful nor partially successful') } transformByQState.setToSucceeded() diff --git a/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts b/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts index 8bea3486bd3..cc376e6ce4a 100644 --- a/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts +++ b/packages/core/src/codewhisperer/service/transformByQ/transformationResultsViewProvider.ts @@ -423,8 +423,8 @@ export class ProposedTransformationExplorer { programmingLanguage: { languageName: transformByQState.getTransformationType() === TransformationType.LANGUAGE_UPGRADE - ? 'JAVA' - : 'SQL', + ? 'java' + : 'sql', }, linesOfCodeChanged: metricsData.linesOfCodeChanged, charsOfCodeChanged: metricsData.charactersOfCodeChanged,