765b6b09 by Ean Schuessler

Service must call "fail" not "error"

Refs: #7564
1 parent 8b4d562b
......@@ -203,7 +203,7 @@ define(function(require) {
var apiHandler = globalOptions.api || function(apiName, data) {};
return apiHandler(apiName, data, {sessionId: self.get('sessionId')}).always(function() {
self.unset('errorMessage');
}).done(applyLoginResults).error(function(xhr) {
}).done(applyLoginResults).fail(function(xhr) {
if (xhr.responseJSON && xhr.responseJSON.errorMessage) {
self.set('errorMessage', xhr.responseJSON.errorMessage);
}
......