-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we merge Error.Message and Error.Exception? #231
Comments
I must say, that I am not a fan of this change. Especially I would still vote for just removing a If that is a no go, then I would rather keep current state than adding more generic parameters. |
Thanks for the feedback and for helping get the best API we can! The reason I don't want to limit error type to be only exception is that there's a general move away from using exception to report errors from things like network etc. as for the concern re
|
but yeah, the extra generic is definitely a downside of this change that I want to have a bigger discussion on. |
I'm with @ghus-raba |
+1. My vote is to keep it as it, making error generic complicates the APIs even further and I don't think it is worth it. At least not in this version. |
I like the OP I would like something similar to:
Maybe With that sealed class you could do all possible escenarios:
I like the generic error approach but if it can be a problem, it could be:
In my case I would like to abstract all datasources using domain models (which implies using domain error models too instead of propagate exceptions). If Store could hang error models instead of only exceptions should be great because probably I could avoid mapping the |
closing for now, might approach again in next version of store. |
We've received feedback from alpha users that StoreResponse has too many subclasses which make it annoying to handle.
I'm not sure if there's a clean way to merge them together if we want to support non exception error handling as a first class citizen.
The "easy" way to do it would be to make StoreResponse generic on the error type as well:
The text was updated successfully, but these errors were encountered: