Hi guys. May I ask for some help. I was trying to ...
# arrow
a
Hi guys. May I ask for some help. I was trying to use
EitherT<SomeLimitedErrorType,  F,  SomeObject>
and I would like to recover when
Either
returns
Either.left(SomeLimitedErrorType)
but everytime I do
eitherTobject.handleErrorWith { cause -> // TODO }
the
cause
is of type
throwable
. I though it should be my stated left value which is
SomeLimitedErrorType
? Am I doing it wrong?
s
Yes, you should be able to
handleErrorWith
E
. Could you share some code?
j
@simon.vergauwen I only recently changed
MonadError
for
EitherT
to work with
E
instead of lifting trough and using
Throwable
: https://github.com/arrow-kt/arrow-incubator/pull/64 So this will only work properly in the current snapshots for 0.10.5 and forward...
👍 1
a
I was actually already using
0.10.5
. It is now working fine. I swear yesterday it was returning a
Throwable
but when I opened the project today, its now returning my error type. I apologize for this. Thank you guys.
s
@Archie that might’ve been some weird cache issue. I’ve seen those before, and they often get reset in 24h intervals so might’ve been that. You’re very welcome!
😄 1