Skip to content

Commit

Permalink
fix(smithy-client): decorateServiceException not to overwrite modeled…
Browse files Browse the repository at this point in the history
… members
  • Loading branch information
AllanZhengYP committed Feb 14, 2022
1 parent 0842cee commit c9cf9d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/smithy-client/src/exceptions.ts
Expand Up @@ -49,7 +49,7 @@ export const decorateServiceException = <E extends ServiceException>(
.filter(([, v]) => v !== undefined)
.forEach(([k, v]) => {
// @ts-ignore assign unmodeled keys
exception[k] = v;
exception[k] = exception[k] ?? v;
});
// load error message from possible locations
// @ts-expect-error message could exist in Message key.
Expand Down

0 comments on commit c9cf9d0

Please sign in to comment.