Skip to content

Should we merge Error.Message and Error.Exception? #231

Description

@eyalgu

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>()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionwe are discussing what to do, usually based on some feature request or commentenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions