Skip to content
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

Flatten out underlyingErrors #119

Open
bobgodwinx opened this issue Oct 27, 2017 · 3 comments
Open

Flatten out underlyingErrors #119

bobgodwinx opened this issue Oct 27, 2017 · 3 comments

Comments

@bobgodwinx
Copy link
Member

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

@ashfurrow
Copy link
Member

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

@dangthaison91
Copy link
Contributor

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

@bobgodwinx
Copy link
Member Author

@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
Projects
None yet
Development

No branches or pull requests

3 participants