You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanException.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanManager.kt
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -282,13 +282,14 @@ class CodeWhispererCodeScanManager(val project: Project) {
282
282
isProjectScanInProgress.set(false)
283
283
}
284
284
val errorMessage = handleError(coroutineContext, e, scope)
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanSession.kt
+23-21Lines changed: 23 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,7 @@ class CodeWhispererCodeScanSession(val sessionContext: CodeScanSessionContext) {
154
154
}
155
155
}
156
156
val errorMessage = createCodeScanResponse.errorMessage()?.let { it } ?: message("codewhisperer.codescan.run_scan_error_telemetry")
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/model/CodeWhispererModel.kt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,8 @@ data class CodeScanResponseContext(
Copy file name to clipboardExpand all lines: plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/CodeWhispererCodeScanTest.kt
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,34 @@ class CodeWhispererCodeScanTest : CodeWhispererCodeScanTestBase(PythonCodeInsigh
154
154
assertThat(res).hasSize(1)
155
155
}
156
156
157
+
@Test
158
+
fun`test getTelemetryErrorMessage should return the correct error message`() {
159
+
val exceptions =listOf(
160
+
Exception("Resource not found."),
161
+
Exception("Service returned HTTP status code 407"),
162
+
Exception("Service returned HTTP status code 403"),
codewhisperer.codescan.file_not_found=For file path {0} with error message: {0}
765
765
codewhisperer.codescan.file_too_large=Amazon Q: The selected file exceeds the input artifact limit. Try again with a smaller file. For more information about scan limits, see the Amazon Q documentation.
0 commit comments