From ae024fd841aaef2e30259730632cf29886e18071 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.tsx | 7 +++++-- x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx index bf3dd33f2cf58..20f49c16301e5 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx +++ b/src/plugins/data/public/index_patterns/index_patterns/index_pattern.tsx @@ -581,10 +581,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 0674a29c2a621..fbfbb3f093ca3 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -870,7 +870,6 @@ "data.functions.esaggs.inspector.dataRequest.description": "このリクエストは Elasticsearch にクエリし、ビジュアライゼーション用のデータを取得します。", "data.functions.esaggs.inspector.dataRequest.title": "データ", "data.indexPatterns.editIndexPattern": "インデックスパターンを編集", - "data.indexPatterns.fetchFieldErrorTitle": "フィールドの取得中にエラーが発生", "data.indexPatterns.unableWriteLabel": "インデックスパターンを書き込めません!このインデックスパターンへの最新の変更を取得するには、ページを更新してください。", "data.indexPatterns.unknownFieldErrorMessage": "インデックスパターン「{title}」のフィールド「{name}」が不明なフィールドタイプを使用しています。", "data.indexPatterns.unknownFieldHeader": "不明なフィールドタイプ {type}", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 71d906d973669..b45f2c73aeef2 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -870,7 +870,6 @@ "data.functions.esaggs.inspector.dataRequest.description": "此请求将查询 Elasticsearch 以获取用于可视化的数据。", "data.functions.esaggs.inspector.dataRequest.title": "数据", "data.indexPatterns.editIndexPattern": "编辑索引模式", - "data.indexPatterns.fetchFieldErrorTitle": "提取字段时出错", "data.indexPatterns.unableWriteLabel": "无法写入索引模式!请刷新页面以获取此索引模式的最新更改。", "data.indexPatterns.unknownFieldErrorMessage": "indexPattern “{title}” 中的字段 “{name}” 使用未知字段类型。", "data.indexPatterns.unknownFieldHeader": "未知字段类型 {type}",