mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Prevent refresh fields error from breaking index patterns management 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
This commit is contained in:
parent
4692d195d9
commit
bd66f16a07
1 changed files with 10 additions and 1 deletions
|
@ -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';
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue