Skip to content

Commit 207d851

Browse files
author
David Hasani
committed
fix(amazonq): do not overwrite failure reason and use lowercase lang name
1 parent 5f012c8 commit 207d851

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,12 @@ export async function finalizeTransformationJob(status: string) {
718718
if (!(status === 'COMPLETED' || status === 'PARTIALLY_COMPLETED')) {
719719
getLogger().error(`CodeTransformation: ${CodeWhispererConstants.failedToCompleteJobNotification}`)
720720
jobPlanProgress['transformCode'] = StepProgress.Failed
721-
transformByQState.setJobFailureErrorNotification(CodeWhispererConstants.failedToCompleteJobNotification)
722-
transformByQState.setJobFailureErrorChatMessage(CodeWhispererConstants.failedToCompleteJobChatMessage)
721+
if (!transformByQState.getJobFailureErrorNotification()) {
722+
transformByQState.setJobFailureErrorNotification(CodeWhispererConstants.failedToCompleteJobNotification)
723+
}
724+
if (!transformByQState.getJobFailureErrorChatMessage()) {
725+
transformByQState.setJobFailureErrorChatMessage(CodeWhispererConstants.failedToCompleteJobChatMessage)
726+
}
723727
throw new Error('Job was not successful nor partially successful')
724728
}
725729
transformByQState.setToSucceeded()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ export class ProposedTransformationExplorer {
423423
programmingLanguage: {
424424
languageName:
425425
transformByQState.getTransformationType() === TransformationType.LANGUAGE_UPGRADE
426-
? 'JAVA'
427-
: 'SQL',
426+
? 'java'
427+
: 'sql',
428428
},
429429
linesOfCodeChanged: metricsData.linesOfCodeChanged,
430430
charsOfCodeChanged: metricsData.charactersOfCodeChanged,

0 commit comments

Comments
 (0)