Handling Missing 'cause' in @effect/schema Exceptions
I'm looking for a way to detect if a given exception is one produced by
I'm guessing this is an oversight? Found one case here that's missing the
https://github.com/Effect-TS/effect/blob/423dd38c1c634a44e084c0de9ddd9f1b92aa4617/packages/schema/src/ParseResult.ts#L734
@effect/schema. The exceptions I've seen are all instances of the generic base Error. I searched the code and found that many places will assign a cause with the parse issue, so I can use that. However, not all errors have a cause. For example:I'm guessing this is an oversight? Found one case here that's missing the
cause (not sure if it's the one causing the example above):https://github.com/Effect-TS/effect/blob/423dd38c1c634a44e084c0de9ddd9f1b92aa4617/packages/schema/src/ParseResult.ts#L734
