Ember-ajax and retry

In our app, we’re using ember-ajax both as integrated with Ember Data and as a service. However, our API backend is currently rather flaky, returning 500’s maybe 20% of the time. Until we get to the bottom of our backend issues (which may take some time), I would like to implement a retry system, only on 500’s. So I’m looking for suggestions for the best way to approach this. Ideally, I want to implement this globally, so whatever AJAX calls I make anywhere in our app will automatically have a retry on error (or at least have a numRetries parameter).

Suggestions?

Give ember-concurrency a go. Here’s a blog post on how to use it for retry.

1 Like

Thanks for the pointer. I actually do have ember-concurrency installed, but I never considered I could use it for retry. I may even try to install & use ember-retry.