Open JCSooHwanCho opened 2 years ago
Hi @JCSooHwanCho
Thanks for this PR.
Mmmmh, I'm not sure if this is useful to be able to map the error since an AsyncSequence, unlike a Combine publisher, is not parametrised by a Failure type.
In the end we still have to handle all kinds of Errors in the catch
section. The mapError does not bring type safety here.
Do you see a big advantage to that ?
@twittemb I needed some functionality that catch some error and change it to another Error. so first I thought was mapError operator in Combine, implement and use it. but by your comment, catch operator in RxSwift is rather nicer than mapError with AsyncSequence case.
@JCSooHwanCho I have introduced a .mapToResult
operator (main branch), it might be more versatile
Description
This PR adds MapError Operator, which is transforms error upstream emits
Checklist