title: Ember: catch not working with ember-data findRecord error
body: <p>I can't figure out why I can't catch this error:</p>
  
  <pre><code>Assertion Failed: You made a 'findRecord' request for a 'cart' with id '3ea1901a-56a9-11e7-a8f4-60e147bfe84c', but the adapter's response did not have any data
  </code></pre>
  
  <p>This is happening when trying to add an item to my cart service, but there's a problem with the API.  Specifically, I am testing a security scenario where there's a token mismatch with the API.  The API will send back an empty response, which it is doing, but I want ember to <code>catch</code> that error and trigger a <code>addItemToNewCart</code> function.</p>
  
  <p>This is the 'add' method:</p>
  
  <pre><code>// cart methods
  add(item) {
  
      let self = this;
  
      // get cart from API first.  if this fails (in catch clause) a new one should be created
      return this.get('store').findRecord('cart', get(this, 'cartObj.id')).then(response =&gt; {
  
          console.log("RESPONSE", response.get('cartitems'));
          // check if cart already has lineitem
          let existingLineItem = response.get('cartitems').findBy('skuid', item.skuid);
          if (existingLineItem) { // if item is already in cart, just add more
              console.log("line item in response, adding quantity");
              set(existingLineItem, 'quantity', parseInt(existingLineItem.quantity)+parseInt(item.quantity))
          } else {
              console.log("line item not in response, adding new");
              response.get('cartitems').addObject(item);
          }
          // saving persists the cart back to API
          response.save().then(newCart =&gt; {
              set(this, 'cartObj', newCart);
          });
      }).catch(e =&gt; {
          // this is not firing even though there is an error
          console.log("problem with findRecord - create a new cart and add item to it", e.message);
          self._addItemToNewCart(item);
      });
  
  },
  </code></pre>
  
  <p>It appears that somehow the ember-data promise is successfully resolving, because the console.log messages I have within the <code>then</code> block are being printed:</p>
  
  <p><a href="https://i.stack.imgur.com/HUpU5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HUpU5.png" alt="enter image description here"></a></p>
  
  <p>I am guessing <code>findRecord</code> is looking locally first, finding the cart, executing the <code>then</code> block and an async <code>findRecord</code> is coming in later with an error from the API (too late for the catch block), maybe?</p>
  
  <p>If that's the case, how do I say, "wait for a response from the API before doing <em>anything</em> and if the response is empty, call <code>_addItemToNewCart</code>" ?</p>