Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import software.amazon.awssdk.core.exception.SdkServiceException
import software.amazon.awssdk.services.codewhispererruntime.model.GetTestGenerationResponse
import software.amazon.awssdk.services.codewhispererruntime.model.Range
import software.amazon.awssdk.services.codewhispererruntime.model.StartTestGenerationResponse
Expand Down Expand Up @@ -144,6 +145,11 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin
} catch (e: Exception) {
LOG.error(e) { "Unexpected error while creating test generation job" }
val errorMessage = getTelemetryErrorMessage(e, CodeWhispererConstants.FeatureName.TEST_GENERATION)

// Sending requestId to telemetry if there is Validation Exception
if (e is SdkServiceException) {
session.startTestGenerationRequestId = e.requestId()
}
throw CodeTestException(
"CreateTestJobError: $errorMessage",
"CreateTestJobError",
Expand Down
Loading