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:
sealed class StoreResponse<out DATA, out ERROR> {
class Data<out DATA> : StoreResponse<DATA, Nothing>()
class Error<out ERROR> : StoreResponse<Nothing, ERROR>()
}
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: