Handling Specific Errors in RPC with Effect Typescript

So my RPC can throw a bunch of errors, out of which I want to ignore all of them for now except MyPreferredError

To type the RPC error type, I tried Schema.Union(Schema.Unknown, MyPreferredError), but that doesn't work ofc because the unknown eats up everything. So how can i do this?
Was this page helpful?