File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ import kotlinx.coroutines.CoroutineScope
1616import kotlinx.coroutines.Job
1717import kotlinx.coroutines.delay
1818import kotlinx.coroutines.launch
19+ import software.amazon.awssdk.core.exception.SdkServiceException
1920import software.amazon.awssdk.services.codewhispererruntime.model.GetTestGenerationResponse
2021import software.amazon.awssdk.services.codewhispererruntime.model.Range
2122import software.amazon.awssdk.services.codewhispererruntime.model.StartTestGenerationResponse
2223import software.amazon.awssdk.services.codewhispererruntime.model.TargetCode
2324import software.amazon.awssdk.services.codewhispererruntime.model.TestGenerationJobStatus
24- import software.amazon.awssdk.services.codewhispererruntime.model.ThrottlingException
2525import software.amazon.awssdk.services.codewhispererstreaming.model.ExportContext
2626import software.amazon.awssdk.services.codewhispererstreaming.model.ExportIntent
2727import software.aws.toolkits.core.utils.debug
@@ -129,8 +129,8 @@ class CodeWhispererUTGChatManager(val project: Project, private val cs: Coroutin
129129 )
130130 } catch (e: Exception ) {
131131 val statusCode = when {
132- e is ThrottlingException -> e.statusCode()
133- else -> 500
132+ e is SdkServiceException -> e.statusCode()
133+ else -> 400
134134 }
135135 LOG .error(e) { " Unexpected error while creating test generation job" }
136136 val errorMessage = getTelemetryErrorMessage(e, CodeWhispererConstants .FeatureName .TEST_GENERATION )
You can’t perform that action at this time.
0 commit comments