Defining RPC Layers with Error Channels: Anti-pattern or Not?

is it an anti-pattern to define RPC layers with an error channel, eg

export const CoursesLive: Layer.Layer<Rpc.Handler<"CourseList">, Database.DatabaseConnectionLostError | ConfigError.ConfigError> =


if the RPC implementation requires a database & config, which can both potentially fail to construct?
Was this page helpful?