From 66be6ffae8ba305f163435e8282719b4560348d6 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 27 Jan 2020 17:40:51 +0100 Subject: [PATCH] Don't throw exception when refreshing fields of an indexpattern (#55836) * An exception when refreshing fields of an selected index pattern causes Discover to load incompletely * Add index ID + Title to the error message for --- .../public/index_patterns/index_patterns/index_pattern.ts | 7 +++++-- x-pack/plugins/translations/translations/ja-JP.json | 3 +-- x-pack/plugins/translations/translations/zh-CN.json | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts index e3482dd483035..5c09e22b6dbb4 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts @@ -492,10 +492,13 @@ export class IndexPattern implements IIndexPattern { toasts.addError(err, { title: i18n.translate('data.indexPatterns.fetchFieldErrorTitle', { - defaultMessage: 'Error fetching fields', + defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})', + values: { + id: this.id, + title: this.title, + }, }), }); - throw err; }); } diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index d1563ff4a0844..b4c85f369519d 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -723,7 +723,6 @@ "data.filter.options.pinAllFiltersButtonLabel": "すべてピン付け", "data.filter.options.unpinAllFiltersButtonLabel": "すべてのピンを外す", "data.filter.searchBar.changeAllFiltersTitle": "すべてのフィルターの変更", - "data.indexPatterns.fetchFieldErrorTitle": "フィールドの取得中にエラーが発生", "data.indexPatterns.unableWriteLabel": "インデックスパターンを書き込めません!このインデックスパターンへの最新の変更を取得するには、ページを更新してください。", "data.indexPatterns.unknownFieldErrorMessage": "インデックスパターン「{title}」のフィールド「{name}」が不明なフィールドタイプを使用しています。", "data.indexPatterns.unknownFieldHeader": "不明なフィールドタイプ {type}", @@ -13205,4 +13204,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "フィールドを選択してください。", "xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。" } -} \ No newline at end of file +} diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 27787a11e43ca..583f181e148c6 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -723,7 +723,6 @@ "data.filter.options.pinAllFiltersButtonLabel": "全部固定", "data.filter.options.unpinAllFiltersButtonLabel": "全部取消固定", "data.filter.searchBar.changeAllFiltersTitle": "更改所有筛选", - "data.indexPatterns.fetchFieldErrorTitle": "提取字段时出错", "data.indexPatterns.unableWriteLabel": "无法写入索引模式!请刷新页面以获取此索引模式的最新更改。", "data.indexPatterns.unknownFieldErrorMessage": "indexPattern “{title}” 中的字段 “{name}” 使用未知字段类型。", "data.indexPatterns.unknownFieldHeader": "未知字段类型 {type}", @@ -13204,4 +13203,4 @@ "xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。", "xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。" } -} \ No newline at end of file +}