Skip to content

Commit 67f053c

Browse files
authored
fix(amazonq): remove requestId param #6524
## 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
1 parent fb26635 commit 67f053c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

packages/core/src/amazonqGumby/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class AlternateDependencyVersionsNotFoundError extends Error {
4343
}
4444

4545
export class JobStoppedError extends Error {
46-
constructor(readonly requestId: string) {
46+
constructor() {
4747
super('Job was rejected, stopped, or failed')
4848
}
4949
}

packages/core/src/codewhisperer/service/transformByQ/transformApiHandler.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,7 @@ export async function pollTransformationJob(jobId: string, validStates: string[]
686686
* is called, we break above on validStatesForCheckingDownloadUrl and check final status in finalizeTransformationJob
687687
*/
688688
if (CodeWhispererConstants.failureStates.includes(status)) {
689-
throw new JobStoppedError(
690-
response.transformationJob.reason ?? 'no failure reason in GetTransformation response'
691-
)
689+
throw new JobStoppedError()
692690
}
693691
await sleep(CodeWhispererConstants.transformationJobPollingIntervalSeconds * 1000)
694692
} catch (e: any) {

0 commit comments

Comments
 (0)