Skip to content

Commit c802262

Browse files
committed
chore: remove filterSensitiveLog for union service exceptions
1 parent af5e1f9 commit c802262

File tree

1 file changed

+4
-1
lines changed
  • smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen

1 file changed

+4
-1
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/UnionGenerator.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import software.amazon.smithy.model.Model;
2323
import software.amazon.smithy.model.shapes.MemberShape;
2424
import software.amazon.smithy.model.shapes.UnionShape;
25+
import software.amazon.smithy.model.traits.ErrorTrait;
2526
import software.amazon.smithy.utils.SmithyInternalApi;
2627
import software.amazon.smithy.utils.StringUtils;
2728

@@ -177,7 +178,9 @@ public void run() {
177178
writeUnionMemberInterfaces();
178179
writeVisitorType();
179180
writeVisitorFunction();
180-
writeFilterSensitiveLog();
181+
if (!this.shape.hasTrait(ErrorTrait.class)) {
182+
writeFilterSensitiveLog();
183+
}
181184
if (includeValidation) {
182185
writeValidate();
183186
}

0 commit comments

Comments
 (0)