@@ -11,69 +11,57 @@ export class TestGenError extends ToolkitError {
11
11
constructor (
12
12
error : string ,
13
13
code : string ,
14
- public statusCode : number ,
15
14
public uiMessage : string
16
15
) {
17
16
super ( error , { code } )
18
17
}
19
18
}
20
19
export class ProjectZipError extends TestGenError {
21
20
constructor ( error : string ) {
22
- super ( error , 'ProjectZipError' , 400 , defaultTestGenErrorMessage )
21
+ super ( error , 'ProjectZipError' , defaultTestGenErrorMessage )
23
22
}
24
23
}
25
24
export class InvalidSourceZipError extends TestGenError {
26
25
constructor ( ) {
27
- super ( 'Failed to create valid source zip' , 'InvalidSourceZipError' , 400 , defaultTestGenErrorMessage )
26
+ super ( 'Failed to create valid source zip' , 'InvalidSourceZipError' , defaultTestGenErrorMessage )
28
27
}
29
28
}
30
29
export 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 )
33
32
}
34
33
}
35
34
export 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 )
38
37
}
39
38
}
40
39
export 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 )
43
42
}
44
43
}
45
44
export class TestGenTimedOutError extends TestGenError {
46
45
constructor ( ) {
47
46
super (
48
47
'Test generation failed. Amazon Q timed out.' ,
49
48
'TestGenTimedOutError' ,
50
- 500 ,
51
49
technicalErrorCustomerFacingMessage
52
50
)
53
51
}
54
52
}
55
53
export class TestGenStoppedError extends TestGenError {
56
54
constructor ( ) {
57
- super ( 'Unit test generation cancelled.' , 'TestGenCancelled' , 400 , 'Unit test generation cancelled.' )
55
+ super ( 'Unit test generation cancelled.' , 'TestGenCancelled' , 'Unit test generation cancelled.' )
58
56
}
59
57
}
60
58
export 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 )
68
61
}
69
62
}
70
63
export 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 )
78
66
}
79
67
}
0 commit comments