Skip to content

Commit 39ac131

Browse files
committed
fix(smithy-client): decorateServiceException not to overwrite modeled members
1 parent 7d2182f commit 39ac131

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/smithy-client/src/exceptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const decorateServiceException = <E extends ServiceException>(
5050
.filter(([, v]) => v !== undefined)
5151
.forEach(([k, v]) => {
5252
// @ts-ignore assign unmodeled keys
53-
exception[k] = v;
53+
exception[k] = exception[k] ?? v;
5454
});
5555
// load error message from possible locations
5656
// @ts-expect-error message could exist in Message key.

0 commit comments

Comments
 (0)