Skip to content

Commit 17b5f40

Browse files
authored
Merge branch 'main' into repomap
2 parents ee49b2a + 970fee0 commit 17b5f40

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqCodeTest/CodeWhispererUTGChatManager.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import kotlinx.coroutines.CoroutineScope
1616
import kotlinx.coroutines.Job
1717
import kotlinx.coroutines.delay
1818
import kotlinx.coroutines.launch
19+
import software.amazon.awssdk.core.exception.SdkServiceException
1920
import software.amazon.awssdk.services.codewhispererruntime.model.GetTestGenerationResponse
2021
import software.amazon.awssdk.services.codewhispererruntime.model.Range
2122
import software.amazon.awssdk.services.codewhispererruntime.model.StartTestGenerationResponse
@@ -148,6 +149,11 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin
148149
} catch (e: Exception) {
149150
LOG.error(e) { "Unexpected error while creating test generation job" }
150151
val errorMessage = getTelemetryErrorMessage(e, CodeWhispererConstants.FeatureName.TEST_GENERATION)
152+
153+
// Sending requestId to telemetry if there is Validation Exception
154+
if (e is SdkServiceException) {
155+
session.startTestGenerationRequestId = e.requestId()
156+
}
151157
throw CodeTestException(
152158
"CreateTestJobError: $errorMessage",
153159
"CreateTestJobError",

0 commit comments

Comments
 (0)