Ember-data.js 500 status response

Hi there,

Is there any way to handle 500 status error, when creating a new model e.g

var model = this.store.createRecord('user');
model.save().then(function() {

}, function(error) {
// this callback will not be executed if 500 status response
});

However, I can catch it using becameError event on model, but in this case an error object will not be available.

Thanks for your answers.

You can use handleResponse() in your adapter for this model, then handle it as you wish.