Skip to content

Commit c9cf9d0

Browse files
committed
fix(smithy-client): decorateServiceException not to overwrite modeled members
1 parent 0842cee commit c9cf9d0

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
@@ -49,7 +49,7 @@ export const decorateServiceException = <E extends ServiceException>(
4949
.filter(([, v]) => v !== undefined)
5050
.forEach(([k, v]) => {
5151
// @ts-ignore assign unmodeled keys
52-
exception[k] = v;
52+
exception[k] = exception[k] ?? v;
5353
});
5454
// load error message from possible locations
5555
// @ts-expect-error message could exist in Message key.

0 commit comments

Comments
 (0)