-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handling validation errors in approach/code generation #5245
base: master
Are you sure you want to change the base?
Conversation
7cb387f
to
a4bd05d
Compare
this.messenger.sendErrorMessage( | ||
'', | ||
message.tabID, | ||
0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it good to not provide retry for this, as this conversation will be counted ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As many retries the user will do will not help, since this only can happen when our toolkit has a bug, then we need to have another version of the toolkit
@@ -15,7 +15,7 @@ export const featureDevChat = 'featureDevChat' | |||
export const featureName = 'Amazon Q Developer Agent for software development' | |||
|
|||
// Max allowed size for file collection | |||
export const maxRepoSizeBytes = 200 * 1024 * 1024 | |||
export const maxRepoSizeBytes = 250 * 1024 * 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we changing this ? The current public documentation says 200MB limit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be committed, removing it from the CR
@@ -230,6 +238,18 @@ export class FeatureDevClient { | |||
e.code === 'ServiceQuotaExceededException') | |||
) { | |||
throw new CodeIterationLimitError() | |||
} else if ( | |||
isAwsError(e) && | |||
e.name === 'ValidationException' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For CodewhispererRuntimeException
, we will have to use e.code
for verifying exception type.
@@ -184,6 +185,13 @@ export class FeatureDevClient { | |||
e.name === 'ServiceQuotaExceededException' | |||
) { | |||
throw new PlanIterationLimitError() | |||
} else if ( | |||
e.name === 'ValidationException' && | |||
e.message.includes('repo size is exceeding the limits') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this same message is being used twice in two different places. Can we extract it somewhere?
Same with zipped file is corrupted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure good idea
de7e1de
to
06fc70a
Compare
Problem: When a validation errors(repo size exceeds limit or corrupted zip file) thrown from approach/code generation it will show generic internal error to the user Solution: Catch those errors and show proper errors
06fc70a
to
d12165e
Compare
CI failing. Also needs a rebase. |
Problem
When a validation errors(repo size exceeds limit or corrupted zip file) thrown from approach/code generation it will show generic internal error to the user
Solution
Catch those errors and show proper errors
-->
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.