Effect CommunityEC
Effect Community•2y ago•
6 replies
codethread

Handling Redacted Fields in Nested Optional Structs with Schema Annotations

Hi there šŸ™‚ I'm trying to write a schema with
Redacted
fields but when I have a nested optional struct, the Redacted field gets logged if there's a parse error. I wonder if I'm doing something wrong in how I'm laying out the schema, or trying to annotate it?

schema looks something like

S.Struct({
  nested: S.optional(S.Struct({
    secret: S.optional(S.Redacted(S.String)),
    info: S.String
  }))
}),


here's a playground link with examples https://effect.website/play#7a17c000b92b
Was this page helpful?