From 5ec6906aa41fc4679793546608f0f5ad97774884 Mon Sep 17 00:00:00 2001 From: Allan Zheng Date: Tue, 4 May 2021 09:54:31 -0700 Subject: [PATCH] fix(protocol-tests): ser test handler should throw error not object --- .../amazon/smithy/typescript/codegen/protocol-test-stub.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts index bb16a159e84..7ffbfff1895 100644 --- a/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts +++ b/smithy-typescript-codegen/src/main/resources/software/amazon/smithy/typescript/codegen/protocol-test-stub.ts @@ -5,8 +5,10 @@ import { Readable } from 'stream'; /** * Throws an expected exception that contains the serialized request. */ -class EXPECTED_REQUEST_SERIALIZATION_ERROR { - constructor(readonly request: HttpRequest) {} +class EXPECTED_REQUEST_SERIALIZATION_ERROR extends Error { + constructor(readonly request: HttpRequest) { + super(); + } } /**