File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/core/src/codewhisperer/service Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
1818 CreateUploadUrlError ,
1919 ExportResultsArchiveError ,
2020 InvalidSourceZipError ,
21+ TestGenFailedError ,
2122 TestGenStoppedError ,
2223 TestGenTimedOutError ,
2324} from '../../amazonqTest/error'
@@ -196,6 +197,9 @@ export async function pollTestJobStatus(
196197 if ( resp . testGenerationJob ?. status !== CodeWhispererConstants . TestGenerationJobStatus . IN_PROGRESS ) {
197198 // This can be FAILED or COMPLETED
198199 status = resp . testGenerationJob ?. status as CodeWhispererConstants . TestGenerationJobStatus
200+ if ( status === CodeWhispererConstants . TestGenerationJobStatus . FAILED ) {
201+ throw new TestGenFailedError ( resp . testGenerationJob ?. jobStatusReason )
202+ }
199203 logger . verbose ( `testgen job status: ${ status } ` )
200204 logger . verbose ( `Complete polling test job status.` )
201205 break
You can’t perform that action at this time.
0 commit comments