[#154, backend/elasticsearch][s]: backend errors now reported up the stack (implement deferred reject when call to backend fails).
This commit is contained in:
@@ -213,6 +213,12 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
|
||||
results.hits.facets = results.facets;
|
||||
}
|
||||
dfd.resolve(results.hits);
|
||||
}).fail(function(errorObj) {
|
||||
var out = {
|
||||
title: 'Failed: ' + errorObj.status + ' code',
|
||||
message: errorObj.responseText
|
||||
};
|
||||
dfd.reject(out);
|
||||
});
|
||||
return dfd.promise();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user