Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- subscription = getFaces()
- .throttleTime(1000)
- .switchMap(face => {
- return Observable.fromPromise(authenticateUserFace(face))
- .catch(err => {
- console.log('Not found') // I want this to happen after 3 consecutive attempts
- // But I don't want to retry
- // I want a new value from the outer observable
- return Observable.empty()
- })
- })
- .subscribe((token) => {
- console.log('Found')
- console.log(token)
- })
Add Comment
Please, Sign In to add comment