Implementing Middleware and Global Error Handling with `@effect/rpc`
With
1- apply a middleware to a group of rpcs? (use case: 50% of my rpc should use an
2- handle errors globally? (use case: most requests could throw
@effect/rpc is it possible to:1- apply a middleware to a group of rpcs? (use case: 50% of my rpc should use an
AdminAuthMiddleware, and 50% use GuestAuthMiddleware)2- handle errors globally? (use case: most requests could throw
SqlError, but if I don't catch it in every resolver it'd complain since the requests are defined with failure: Schema.Never)