Skip to content

Flatten out underlyingErrors #119

Open
@bobgodwinx

Description

@bobgodwinx

Currently

The current implementation of Action doesn't allow you to receive the Swift.Error when .execution is called. But we get an ActionError type which is not really useful because you always have to switch within it to the underlyingError.

Proposal

I think it would be nice for the framework to have something like var underlyingErrors: Observable<Swift.Error> which will only emit when .execution actually has an error

Activity

ashfurrow

ashfurrow commented on Oct 27, 2017

@ashfurrow
Member

That makes sense to me, I believe ReactiveSwift's Command type has something similar. Let's do it!

dangthaison91

dangthaison91 commented on Jan 8, 2018

@dangthaison91
Contributor

Should .errors will be Observable<Swift.Error> while .executionErrors/actionErrors will be Observable<ActionError>? @bobgodwinx

bobgodwinx

bobgodwinx commented on Jan 8, 2018

@bobgodwinx
MemberAuthor

@dangthaison91 exactly, the idea is to separate the errors related to the output from the executionErrors this will make sure that on .errors we will be getting only Swift.Error. Do plan on submitting a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ashfurrow@bobgodwinx@dangthaison91

        Issue actions

          Flatten out underlyingErrors · Issue #119 · RxSwiftCommunity/Action