Skip to content

Commit

Permalink
Add onError to searchSource in discover. Closes #55
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed Apr 21, 2014
1 parent 7ce2e4e commit 52dff98
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/kibana/apps/discover/controllers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ define(function (require) {
if (!angular.equals(sort, currentSort)) $scope.fetch();
});

searchSource.onError().then(function searchError(err) {
console.log(err);
notify.error('An error occured with your request. Reset your inputs and try again.');

return searchSource.onError().then(searchError);
});

// Bind a result handler. Any time searchSource.fetch() is executed this gets called
// with the results
searchSource.onResults().then(function onResults(resp) {
Expand Down

0 comments on commit 52dff98

Please sign in to comment.