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

Retain Observable even during an Error Condition #532

Merged
merged 1 commit into from
Sep 7, 2016

Conversation

Barryrowe
Copy link
Contributor

The way this was setup previously, if an error occurred on the watchPosition observable, the observer was sent an error, which would have to be caught. This also has the side effect of completing the observable, which means anything down stream that would be subscribed would be unsubscribed and no longer receive updates.

Instead of using binding the error callback to observer.error this change just binds the error callback to observer.next and lets the subscriber filter out results that match PositionError rather than having to manage re-subscribing (which could just immediately fail and enter a loop of catch/retry)

The way this was setup previously, if an error occurred on the watchPosition observable, the observer was sent an error, which would have to be caught. This also has the side effect of completing the observable, which means anything down stream that would be subscribed would be unsubscribed and no longer receive updates.

Instead of using binding the error callback to ```observer.error``` this change just binds the error callback to ```observer.next``` and lets the subscriber filter out results that match ```PositionError``` rather than having to manage re-subscribing (which could just immediately fail and enter a loop of catch/retry)
@ihadeed ihadeed merged commit 26dead9 into danielsogl:master Sep 7, 2016
@ihadeed
Copy link
Collaborator

ihadeed commented Sep 7, 2016

thanks @Barryrowe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants