diff --git a/changelogs/fragments/7069.yml b/changelogs/fragments/7069.yml new file mode 100644 index 00000000000..cdc60810159 --- /dev/null +++ b/changelogs/fragments/7069.yml @@ -0,0 +1,2 @@ +fix: +- Update error message in timeline visualization when MDS disabled ([#7069](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7069)) \ No newline at end of file diff --git a/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts b/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts index e5596a001a2..e0509723151 100644 --- a/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts +++ b/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.test.ts @@ -106,7 +106,7 @@ describe('fetchDataSourceIdByName()', () => { await expect( fetchDataSourceIdByName({ ...config, data_source_name: 'Some Data Source' }, client) ).rejects.toThrowError( - 'To query from multiple data sources, first enable the data source feature' + 'data_source_name is not supported. Contact your administrator to start using multiple data sources' ); }); diff --git a/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.ts b/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.ts index e3d0d76d23e..e41ec9246ff 100644 --- a/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.ts +++ b/src/plugins/vis_type_timeline/server/lib/fetch_data_source_id.ts @@ -17,7 +17,9 @@ export const fetchDataSourceIdByName = async ( } if (!getDataSourceEnabled().enabled) { - throw new Error('To query from multiple data sources, first enable the data source feature'); + throw new Error( + 'data_source_name is not supported. Contact your administrator to start using multiple data sources' + ); } const dataSources = await client.find({