Seeking Idiomatic Ways to Re-expose Errors in Services

is there a more idiomatic way of re-exposing errors (i.e. in a service) to avoid 'leaking' errors similar to not leaking dependencies? I ended up with Effect.mapError and a instanceof check, but doesn't feel like the best way?
Was this page helpful?