Recovering errors on an EitherT where the F could be failed after a biSemiFlatMap, it's possible, but took too fucking long to find -

Defined at: catsDataMonadErrorFForEitherT


type EitherTFuture[A] = EitherT[Future, Error, A]
val eitherTFMonadError = MonadError[EitherTFuture, Throwable]
eitherTFMonadError.handleErrorWith(op) { ex =>
EitherT.leftT[Future, Error](
StupidError("Error on operation", ex)

Hopefully it works, lol, haven't written the tests yet

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!