Understanding how `Effect.match` works in the Effect Typescript library can indeed be a bit trick...
i posted about this yesterday, but i'm misunderstanding something. i have an api route which has an
i'm of the understanding that
i can fix this issue by piping in an
Effect.match which onFailure returns a 401 and a onSuccess which returns a 200/401 depending upon the success value. when i pipe the Effect.match it transforms my effect from Effect.Effect<boolean, Error1 | Error2, never> to Effect.Effect<boolean, never, never> which is expected behavior. but, for some reason, it won't catch an AuthenticationError and instead loggs a FiberFailure with a 500, which is unexpected. i'm of the understanding that
Effect.match transforms the error channel into a response, because it's transforming the error channel into never, but maybe i'm wrong. i can fix this issue by piping in an
Effect.catchAll and transforming the error channel into an Effect.succeed. I'm trying to understand the nature of these pipes, and whaat the value of Effect.match is.