EitherT package:either

Generalize Either e as MonadError e m. If the argument has form Left e, an error is produced in the monad via throwError. Otherwise, the Right a part is forwarded.