message: feat(search-backend-module-es): test error handling
diff: @@ -793,6 +793,29 @@ describe('ElasticSearchSearchEngine', () => {
  elasticSearchQuerySpy.mockClear();
  });
  +
  + it('should throws missing index error', async () => {
  + jest.spyOn(clientWrapper, 'search').mockRejectedValue({
  + meta: {
  + body: {
  + error: {
  + type: 'index_not_found_exception',
  + },
  + },
  + },
  + });
  +
  + await expect(
  + async () =>
  + await testSearchEngine.query({
  + term: 'testTerm',
  + types: ['unknown'],
  + filters: {},
  + }),
  + ).rejects.toThrow(
  + 'Missing index for unknown__search. This means there are no documents to search through',
  + );
  + });
  });
  describe('indexer', () => {
  