I have been browsing a lot around the subject.
Just from stackoverflow, the best comprehensive post i found were
Try[Result], IO[Result], Either[Error,Result], which should I use in the end
How to add proper error handling to cats-effect's Resource
I wonder what is the state of art with cats effects as of now ?
MonadBundler introduced in https://typelevel.org/blog/2018/04/13/rethinking-monaderror.html is interesting but sounds not maintained and i wonder if it has been integrated to cats-effects 2 or 3 but renamed ?
Also, I wonder if that statement is still true :
Another problem that might occur with IO is that when you're using an EitherT monad transformer over IO, you end up with two different instances of MonadError for the same type. I.e. you have both MonadError[EitherT[IO, E, ?], E] and MonadError[EitherT[IO, E, ?], Throwable], which can lead to some subtle bugs. With EitherT[UIO, E, ?], E] there's only one error type and therefore only one MonadError instance.
As i am working with cats-effects and not Zio at the moment, i wonder what is the best practice to handle error when using cats-effects IO ?
PS: Out of stackoverflow, the best braoder presentation of the problem i found is in this blog post https://guillaumebogard.dev/posts/functional-error-handling/