From 241c247cfc20b3e6e1fc55dc54341fe2a6b7d795 Mon Sep 17 00:00:00 2001 From: Liza K Date: Tue, 10 Mar 2020 11:33:09 +0200 Subject: [PATCH] oss strategy error handling --- .../kibana/public/discover/np_ready/angular/discover.js | 2 +- .../data/server/search/es_search/es_search_strategy.ts | 2 +- src/plugins/data/server/search/routes.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js index 22218282902d4..5ccee2b92ce33 100644 --- a/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js +++ b/src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js @@ -804,7 +804,7 @@ function discoverController( title: i18n.translate('kbn.discover.errorLoadingData', { defaultMessage: 'Error loading data', }), - toastMessage: error.shortMessage, + toastMessage: error.shortMessage || error.body?.message, }); } }); diff --git a/src/plugins/data/server/search/es_search/es_search_strategy.ts b/src/plugins/data/server/search/es_search/es_search_strategy.ts index 610bf62da17d3..326685eb3883b 100644 --- a/src/plugins/data/server/search/es_search/es_search_strategy.ts +++ b/src/plugins/data/server/search/es_search/es_search_strategy.ts @@ -36,7 +36,7 @@ export const esSearchStrategyProvider: TSearchStrategyProvider