2

Say I am returning an RSVP.Hash from a model hook like this:

model: function() {
  hash = {
    users: App.User.find(),
    contacts: App.Contact.find()
  };

  return Ember.RSVP.hash(hash);
}

This works fine for me in the good case but what about the bad case where one of them returns something other than an http 200? How can I handle errors in this scenario?

Kara
  • 6,115
  • 16
  • 50
  • 57
dagda1
  • 26,856
  • 59
  • 237
  • 450

1 Answers1

1

to have more granular control over errors when using promise composing functions you can use Ember.RSVP.allSettled and Ember.RSVP.hashSettled.

related docs and examples:

Stefan Penner
  • 1,087
  • 8
  • 10