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
+21-5
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,14 @@ 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
+
// BE service will throw ServiceQuota if conversation limit is reached. API Front-end will throw Throttling with this message if conversation limit is reached
69
+
if (
70
+
e is software.amazon.awssdk.services.codewhispererruntime.model.ServiceQuotaExceededException||
71
+
(
72
+
e is software.amazon.awssdk.services.codewhispererruntime.model.ThrottlingException&&
73
+
e.message?.contains("reached for this month.") ==true
74
+
)
75
+
) {
69
76
throwMonthlyConversationLimitError(errMssg, operation =FeatureDevOperation.CreateConversation.toString(), desc =null, cause = e.cause)
70
77
}
71
78
}
@@ -134,10 +141,19 @@ class FeatureDevService(val proxyClient: FeatureDevClient, val project: Project)
134
141
errMssg = e.awsErrorDetails().errorMessage()
135
142
logger.warn(e) { "StartTaskAssistCodeGeneration failed for request: ${e.requestId()}" }
136
143
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
144
+
// API Front-end will throw Throttling if conversation limit is reached. API Front-end monitors StartCodeGeneration for throttling
145
+
if (e is software.amazon.awssdk.services.codewhispererruntime.model.ThrottlingException&&
146
+
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