feedback fixups

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-07-01 09:30:47 +02:00
parent a21cd43467
commit faa5dde25e
@@ -331,7 +331,7 @@ export class ElasticSearchSearchEngine implements SearchEngine {
previousPageCursor,
};
} catch (error) {
if (error.meta.body.error.type === 'index_not_found_exception') {
if (error.meta?.body?.error?.type === 'index_not_found_exception') {
throw new MissingIndexError(
`Missing index for ${queryIndices}. This means there are no documents to search through.`,
error,