@@ -11,69 +11,57 @@ export class TestGenError extends ToolkitError {
1111 constructor (
1212 error : string ,
1313 code : string ,
14- public statusCode : number ,
1514 public uiMessage : string
1615 ) {
1716 super ( error , { code } )
1817 }
1918}
2019export class ProjectZipError extends TestGenError {
2120 constructor ( error : string ) {
22- super ( error , 'ProjectZipError' , 400 , defaultTestGenErrorMessage )
21+ super ( error , 'ProjectZipError' , defaultTestGenErrorMessage )
2322 }
2423}
2524export class InvalidSourceZipError extends TestGenError {
2625 constructor ( ) {
27- super ( 'Failed to create valid source zip' , 'InvalidSourceZipError' , 400 , defaultTestGenErrorMessage )
26+ super ( 'Failed to create valid source zip' , 'InvalidSourceZipError' , defaultTestGenErrorMessage )
2827 }
2928}
3029export class CreateUploadUrlError extends TestGenError {
31- constructor ( errorMessage : string , errorCode : number ) {
32- super ( errorMessage , 'CreateUploadUrlError' , errorCode , technicalErrorCustomerFacingMessage )
30+ constructor ( errorMessage : string ) {
31+ super ( errorMessage , 'CreateUploadUrlError' , technicalErrorCustomerFacingMessage )
3332 }
3433}
3534export class UploadTestArtifactToS3Error extends TestGenError {
36- constructor ( error : string , statusCode ?: number ) {
37- super ( error , 'UploadTestArtifactToS3Error' , statusCode ?? 400 , technicalErrorCustomerFacingMessage )
35+ constructor ( error : string ) {
36+ super ( error , 'UploadTestArtifactToS3Error' , technicalErrorCustomerFacingMessage )
3837 }
3938}
4039export class CreateTestJobError extends TestGenError {
41- constructor ( error : string , statusCode : number ) {
42- super ( error , 'CreateTestJobError' , statusCode , technicalErrorCustomerFacingMessage )
40+ constructor ( error : string ) {
41+ super ( error , 'CreateTestJobError' , technicalErrorCustomerFacingMessage )
4342 }
4443}
4544export class TestGenTimedOutError extends TestGenError {
4645 constructor ( ) {
4746 super (
4847 'Test generation failed. Amazon Q timed out.' ,
4948 'TestGenTimedOutError' ,
50- 500 ,
5149 technicalErrorCustomerFacingMessage
5250 )
5351 }
5452}
5553export class TestGenStoppedError extends TestGenError {
5654 constructor ( ) {
57- super ( 'Unit test generation cancelled.' , 'TestGenCancelled' , 400 , 'Unit test generation cancelled.' )
55+ super ( 'Unit test generation cancelled.' , 'TestGenCancelled' , 'Unit test generation cancelled.' )
5856 }
5957}
6058export class TestGenFailedError extends TestGenError {
61- constructor ( statusCode : number , error ?: string ) {
62- super (
63- error ?? 'Test generation failed' ,
64- 'TestGenFailedError' ,
65- statusCode ,
66- error ?? technicalErrorCustomerFacingMessage
67- )
59+ constructor ( error ?: string ) {
60+ super ( error ?? 'Test generation failed' , 'TestGenFailedError' , error ?? technicalErrorCustomerFacingMessage )
6861 }
6962}
7063export class ExportResultsArchiveError extends TestGenError {
71- constructor ( error ?: string , statusCode ?: number ) {
72- super (
73- error ?? 'Test generation failed' ,
74- 'ExportResultsArchiveError' ,
75- statusCode ?? 400 ,
76- technicalErrorCustomerFacingMessage
77- )
64+ constructor ( error ?: string ) {
65+ super ( error ?? 'Test generation failed' , 'ExportResultsArchiveError' , technicalErrorCustomerFacingMessage )
7866 }
7967}
0 commit comments