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/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/util/FeatureDevService.kt
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,8 @@ class FeatureDevService(val proxyClient: FeatureDevClient, val project: Project)
65
65
errMssg = e.awsErrorDetails().errorMessage()
66
66
logger.warn(e) { "Start conversation failed for request: ${e.requestId()}" }
67
67
68
-
if (e is software.amazon.awssdk.services.codewhispererruntime.model.ServiceQuotaExceededException) {
68
+
// WB service will throw ServiceQuota if conversation limit is reached. RTS will throw Throttling with this message if conversation limit is reached
69
+
if (e is software.amazon.awssdk.services.codewhispererruntime.model.ServiceQuotaExceededException|| (e is software.amazon.awssdk.services.codewhispererruntime.model.ThrottlingException&& e.message?.contains("StartTaskAssistCodeGeneration reached for this month.") ==true)) {
69
70
throwMonthlyConversationLimitError(errMssg, operation =FeatureDevOperation.CreateConversation.toString(), desc =null, cause = e.cause)
70
71
}
71
72
}
@@ -134,10 +135,17 @@ class FeatureDevService(val proxyClient: FeatureDevClient, val project: Project)
134
135
errMssg = e.awsErrorDetails().errorMessage()
135
136
logger.warn(e) { "StartTaskAssistCodeGeneration failed for request: ${e.requestId()}" }
136
137
137
-
if (e is software.amazon.awssdk.services.codewhispererruntime.model.ServiceQuotaExceededException|| (
138
-
e is software.amazon.awssdk.services.codewhispererruntime.model.ThrottlingException&& e.message?.contains(
139
-
"limit for number of iterations on a code generation"
140
-
) ==true
138
+
// RTS will throw Throttling if conversation limit is reached. RTS monitors StartCodeGeneration for throttling
139
+
if (e is software.amazon.awssdk.services.codewhispererruntime.model.ThrottlingException&& e.message?.contains("StartTaskAssistCodeGeneration reached for this month.") ==true) {
Copy file name to clipboardExpand all lines: plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/util/FeatureDevServiceTest.kt
0 commit comments