Guest User

Untitled

a guest
Feb 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. subscription = getFaces()
  2. .throttleTime(1000)
  3. .switchMap(face => {
  4. return Observable.fromPromise(authenticateUserFace(face))
  5. .catch(err => {
  6. console.log('Not found') // I want this to happen after 3 consecutive attempts
  7. // But I don't want to retry
  8. // I want a new value from the outer observable
  9. return Observable.empty()
  10. })
  11. })
  12. .subscribe((token) => {
  13. console.log('Found')
  14. console.log(token)
  15. })
Add Comment
Please, Sign In to add comment