From 69dbdcaa8941b934b37f33d4e7e312e59ecb76af Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 1 Oct 2015 06:46:51 -0700 Subject: [PATCH] Adapter error deprecated. --- app/pods/application/adapter.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/app/pods/application/adapter.js b/app/pods/application/adapter.js index 0a943ec..184060e 100644 --- a/app/pods/application/adapter.js +++ b/app/pods/application/adapter.js @@ -12,24 +12,6 @@ export default DS.RESTAdapter.extend({ coalesceFindRequests: true, - ajaxError: function(jqXHR) { - // http://stackoverflow.com/a/24027443 - var error = this._super(jqXHR); - if (jqXHR && jqXHR.status === 422) { - var response = Ember.$.parseJSON(jqXHR.responseText), - errors = {}; - if (response.errors !== undefined) { - var jsonErrors = response.errors; - Ember.EnumerableUtils.forEach(Object.keys(jsonErrors), function(key) { - errors[Ember.String.camelize(key)] = jsonErrors[key]; - }); - } - return new DS.InvalidError(errors); - } else { - return error; - } - }, - shouldReloadAll: function() { return true; },