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
Crash on asDriverOnErrorJustComplete function #22
Comments
Hi @sergdort , |
Sure, if you don’t mind :) |
Cool! I guess we can close this one :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I started to work on some side project which is based on this great project.
I facing some strange issue that when i execute a request from my view model to the server if the request failed the app crash. After debug it i found the crash is because the asserationFailure command check the error and because the error object is not nil the app crash.
This is the whole function:
func asDriverOnErrorJustComplete() -> Driver<E> { return asDriver { error in assertionFailure("Error \(error)") return Driver.empty() } }
My view model code is:
`
let login = input.loginTrigger.withLatestFrom(emailAndPassword)
.flatMapLatest({ [unowned self] (email, password) in
`
As you can see i use the same best practices like you use in your project.
I also tried to change your code so network requests will fail and the asDriverOnErrorJustComplete but from some reason on your project it ignore the asserationFailure line.
Can someone advice what should i do or what i am doing wrong?
thanks!
The text was updated successfully, but these errors were encountered: