Skip to content

Commit a1650a7

Browse files
committed
fix(protocol-test): fake handler should throw error
1 parent e329689 commit a1650a7

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

protocol_tests/aws-ec2/tests/functional/ec2query.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ import { Readable } from "stream";
2727
/**
2828
* Throws an expected exception that contains the serialized request.
2929
*/
30-
class EXPECTED_REQUEST_SERIALIZATION_ERROR {
31-
constructor(readonly request: HttpRequest) {}
30+
class EXPECTED_REQUEST_SERIALIZATION_ERROR extends Error {
31+
constructor(readonly request: HttpRequest) {
32+
super();
33+
}
3234
}
3335

3436
/**

protocol_tests/aws-json/tests/functional/awsjson1_1.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ import { Readable } from "stream";
1818
/**
1919
* Throws an expected exception that contains the serialized request.
2020
*/
21-
class EXPECTED_REQUEST_SERIALIZATION_ERROR {
22-
constructor(readonly request: HttpRequest) {}
21+
class EXPECTED_REQUEST_SERIALIZATION_ERROR extends Error {
22+
constructor(readonly request: HttpRequest) {
23+
super();
24+
}
2325
}
2426

2527
/**

protocol_tests/aws-query/tests/functional/awsquery.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ import { Readable } from "stream";
3535
/**
3636
* Throws an expected exception that contains the serialized request.
3737
*/
38-
class EXPECTED_REQUEST_SERIALIZATION_ERROR {
39-
constructor(readonly request: HttpRequest) {}
38+
class EXPECTED_REQUEST_SERIALIZATION_ERROR extends Error {
39+
constructor(readonly request: HttpRequest) {
40+
super();
41+
}
4042
}
4143

4244
/**

protocol_tests/aws-restjson/tests/functional/restjson1.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ import { Readable } from "stream";
5151
/**
5252
* Throws an expected exception that contains the serialized request.
5353
*/
54-
class EXPECTED_REQUEST_SERIALIZATION_ERROR {
55-
constructor(readonly request: HttpRequest) {}
54+
class EXPECTED_REQUEST_SERIALIZATION_ERROR extends Error {
55+
constructor(readonly request: HttpRequest) {
56+
super();
57+
}
5658
}
5759

5860
/**

protocol_tests/aws-restxml/tests/functional/restxml.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ import { Readable } from "stream";
6060
/**
6161
* Throws an expected exception that contains the serialized request.
6262
*/
63-
class EXPECTED_REQUEST_SERIALIZATION_ERROR {
64-
constructor(readonly request: HttpRequest) {}
63+
class EXPECTED_REQUEST_SERIALIZATION_ERROR extends Error {
64+
constructor(readonly request: HttpRequest) {
65+
super();
66+
}
6567
}
6668

6769
/**

0 commit comments

Comments
 (0)