Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kievsash/3198f41b665da18ff088bbd8165f9d02 to your computer and use it in GitHub Desktop.
Save kievsash/3198f41b665da18ff088bbd8165f9d02 to your computer and use it in GitHub Desktop.
#ReactiveConf 2018 Lightning Talk Proposal: Conditional Retry logic in Rx.JS in 5 minutes!

This is a my proposal for lightning talk at Reactive Conf 2018. Please ⭐️ if you want to listen to it!

ReactiveConf 2018

Conditional Retry logic in Rx.JS in 5 minutes!

Hello Every-buddy! I am Oleksandr, front-end developer in http://tonicforhealth.com/

In this lightning talk I want to share my experience in using Rx.JS retry operator when you need to customize its behaviour for specific Observable error. it is a shortened version of my speech on JS-FW-days conference in Ukraine.

Content

We know that Rx.JS has retry operator. It means - do one more run for source Observable again if previous run returned error. But what if I need to retry for specific errorCode only? Say for http 401 Unauthorized? CatchError, map and two smoking barrels retry operators in my 5 min introduction to conditional retry in Rx.JS.

BONUS: Interesting use-case for Observable-wrapped http requests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment