diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts index 82e07bbb72f94..e09246ae8cd3e 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts @@ -203,13 +203,12 @@ export class IndexPatternsService { */ getFieldsForWildcard = async (options: GetFieldsOptions) => { const metaFields = await this.config.get(UI_SETTINGS.META_FIELDS); - const result = this.apiClient.getFieldsForWildcard({ + return this.apiClient.getFieldsForWildcard({ pattern: options.pattern, metaFields, type: options.type, rollupIndex: options.rollupIndex, }); - return result; }; /** @@ -268,22 +267,21 @@ export class IndexPatternsService { options: GetFieldsOptions, fieldAttrs: FieldAttrs = {} ) => { - // eslint-disable-next-line no-console - console.log('refreshFieldSpecMap start'); const scriptdFields = Object.values(fields).filter((field) => field.scripted); try { const newFields = (await this.getFieldsForWildcard(options)) as FieldSpec[]; return this.fieldArrayToMap([...newFields, ...scriptdFields], fieldAttrs); } catch (err) { - // eslint-disable-next-line no-console - console.log('refreshFieldSpecMap ERROR'); if (err instanceof IndexPatternMissingIndices) { this.onNotification({ title: (err as any).message, color: 'danger', iconType: 'alert' }); return {}; } - const msg = i18n.translate('data.indexPatterns.fetchFieldErrorTitle', { - defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})', - values: { id, title }, + + this.onError(err, { + title: i18n.translate('data.indexPatterns.fetchFieldErrorTitle', { + defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})', + values: { id, title }, + }), }); throw err; } @@ -383,8 +381,6 @@ export class IndexPatternsService { iconType: 'alert', }); } else { - // eslint-disable-next-line no-console - console.error('fields fetching not possible'); this.onError(err, { title: i18n.translate('data.indexPatterns.fetchFieldErrorTitle', { defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})', @@ -512,8 +508,6 @@ export class IndexPatternsService { .then((resp) => { indexPattern.id = resp.id; indexPattern.version = resp.version; - // eslint-disable-next-line no-console - console.error('index pattern saved successfully'); }) .catch(async (err) => { if (err?.res?.status === 409 && saveAttempts++ < MAX_ATTEMPTS_TO_RESOLVE_CONFLICTS) { diff --git a/src/plugins/data/public/index_patterns/index_patterns/index_patterns_api_client.ts b/src/plugins/data/public/index_patterns/index_patterns/index_patterns_api_client.ts index 91ff60fa2f81b..ca0f35d6612b2 100644 --- a/src/plugins/data/public/index_patterns/index_patterns/index_patterns_api_client.ts +++ b/src/plugins/data/public/index_patterns/index_patterns/index_patterns_api_client.ts @@ -40,11 +40,6 @@ export class IndexPatternsApiClient implements IIndexPatternsApiClient { query, }) .catch((resp: any) => { - // eslint-disable-next-line no-console - console.error('IndexPatternsApiClient ERROR'); - // eslint-disable-next-line no-console - console.error('IndexPatternsApiClient ERROR DEBUG', JSON.stringify(resp)); - if (resp.body.statusCode === 404 && resp.body.attributes?.code === 'no_matching_indices') { throw new IndexPatternMissingIndices(resp.body.message); } diff --git a/test/functional/apps/discover/_date_nanos.js b/test/functional/apps/discover/_date_nanos.js index 7e2ef604f4b13..1b5c033d67a43 100644 --- a/test/functional/apps/discover/_date_nanos.js +++ b/test/functional/apps/discover/_date_nanos.js @@ -27,8 +27,6 @@ export default function ({ getService, getPageObjects }) { const fromTime = 'Sep 22, 2019 @ 20:31:44.000'; const toTime = 'Sep 23, 2019 @ 03:31:44.000'; - // Failing: See https://github.com/elastic/kibana/issues/82035 - describe('date_nanos', function () { before(async function () { await esArchiver.loadIfNeeded('date_nanos');