in src/search/Search.tsx [127:158]
dataSourceNameLookup: getDataSourceNameLookup(dataSources),
});
} catch (e) {
console.log("Error in datasource name lookup");
}
} else {
// The SDK is not configured, use mock data
this.setState({
...getSampleIndexDetails(),
});
}
}
listDataSources = async (
kendra: Kendra,
indexId: string
): Promise<Kendra.DataSourceSummaryList | null> => {
try {
let listDsResponse: PromiseResult<
Kendra.ListDataSourcesResponse,
AWSError
> | null = await kendra
.listDataSources({
IndexId: indexId,
})
.promise();
const dataSources = listDsResponse.SummaryItems || [];
while (listDsResponse?.$response.hasNextPage()) {
const nextPage = listDsResponse.$response.nextPage();
if (nextPage) {