Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(amazonq): show correct error message #5335

Merged
merged 4 commits into from
Feb 8, 2025
Merged

Conversation

dhasani23
Copy link
Contributor

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Show correct error message

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dhasani23 dhasani23 requested review from a team as code owners February 6, 2025 23:14
@@ -279,12 +279,10 @@ fun buildLanguageUpgradeProjectValidChatContent() = CodeTransformChatMessageCont

fun buildProjectInvalidChatContent(validationResult: ValidationResult): CodeTransformChatMessageContent {
val errorMessage = when (validationResult.invalidTelemetryReason.category) {
CodeTransformPreValidationError.NoPom -> message("codemodernizer.chat.message.validation.error.no_pom", CODE_TRANSFORM_PREREQUISITES)
CodeTransformPreValidationError.UnsupportedJavaVersion -> message("codemodernizer.chat.message.validation.error.unsupported_java_version")
CodeTransformPreValidationError.UnsupportedJavaVersion, CodeTransformPreValidationError.UnsupportedBuildSystem -> message("codemodernizer.chat.message.validation.error.unsupported_module")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this generic error message for both of these cases; tells users everything they need to do to set up for /transform.

@@ -279,12 +279,10 @@ fun buildLanguageUpgradeProjectValidChatContent() = CodeTransformChatMessageCont

fun buildProjectInvalidChatContent(validationResult: ValidationResult): CodeTransformChatMessageContent {
val errorMessage = when (validationResult.invalidTelemetryReason.category) {
CodeTransformPreValidationError.NoPom -> message("codemodernizer.chat.message.validation.error.no_pom", CODE_TRANSFORM_PREREQUISITES)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused

@dhasani23 dhasani23 marked this pull request as draft February 7, 2025 18:04
@dhasani23 dhasani23 marked this pull request as ready for review February 7, 2025 19:23
@dhasani23 dhasani23 marked this pull request as draft February 7, 2025 20:05
@dhasani23 dhasani23 marked this pull request as ready for review February 8, 2025 02:19
@dhasani23 dhasani23 enabled auto-merge (squash) February 8, 2025 02:30
@dhasani23 dhasani23 merged commit fd95bc1 into aws:main Feb 8, 2025
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants