Replies: 1 comment
-
It is an intentional limitation of the So, yes, the only way to leverage the abstract class AppError : Exception It does unfortunately mean dropping the use of records, which granted isn't great. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now i usually return
EitherAsync<AppError, A>
from my services,so in controller i can match on either and switch on error type to access properties in
AppError2
case. I've read wiki about Aff, but there is no example of returning error with data. The only way i see how to achieve this with Error is to convert my AppErrors to Exceptions. Is this ok or there is something better? Maybe there should be@catch
overloadif possible to be able to handle different exception types differently and require downcast only in one place?
Beta Was this translation helpful? Give feedback.
All reactions