Skip to content

Commit

Permalink
Prevent refresh fields error from breaking index patterns management …
Browse files Browse the repository at this point in the history
…page (#11885)

* No longer throw an error to the rest of the stack if there is an error refreshing fields for an index pattern

* Only prevent rethrowing for the certain error scenario
  • Loading branch information
chrisronline committed May 18, 2017
1 parent d906788 commit 096db27
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ui/public/index_patterns/_index_pattern.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { SavedObjectNotFound, DuplicateField } from 'ui/errors';
import { SavedObjectNotFound, DuplicateField, IndexPatternMissingIndices } from 'ui/errors';
import angular from 'angular';
import { getComputedFields } from 'ui/index_patterns/_get_computed_fields';
import { formatHit } from 'ui/index_patterns/_format_hit';
Expand Down Expand Up @@ -366,6 +366,15 @@ export function IndexPatternProvider(Private, Notifier, config, kbnIndex, Promis
.then(() => this.save())
.catch((err) => {
notify.error(err);
// https://github.com/elastic/kibana/issues/9224
// This call will attempt to remap fields from the matching
// ES index which may not actually exist. In that scenario,
// we still want to notify the user that there is a problem
// but we do not want to potentially make any pages unusable
// so do not rethrow the error here
if (err instanceof IndexPatternMissingIndices) {
return;
}
return Promise.reject(err);
});
}
Expand Down

0 comments on commit 096db27

Please sign in to comment.