Skip to content

Commit

Permalink
fix(amazonq): remove requestId param #6524
Browse files Browse the repository at this point in the history
## Problem
1) we already have logic to show the user the request ID of the last
failed API call
2) we also already have logic to show them the failure reason
3) when a job is stopped, we don't expect anything to be present in the
`reason` field

## Solution
Remove param
  • Loading branch information
dhasani23 authored Feb 7, 2025
1 parent fb26635 commit 67f053c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/amazonqGumby/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class AlternateDependencyVersionsNotFoundError extends Error {
}

export class JobStoppedError extends Error {
constructor(readonly requestId: string) {
constructor() {
super('Job was rejected, stopped, or failed')
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,7 @@ export async function pollTransformationJob(jobId: string, validStates: string[]
* is called, we break above on validStatesForCheckingDownloadUrl and check final status in finalizeTransformationJob
*/
if (CodeWhispererConstants.failureStates.includes(status)) {
throw new JobStoppedError(
response.transformationJob.reason ?? 'no failure reason in GetTransformation response'
)
throw new JobStoppedError()
}
await sleep(CodeWhispererConstants.transformationJobPollingIntervalSeconds * 1000)
} catch (e: any) {
Expand Down

0 comments on commit 67f053c

Please sign in to comment.