refactor: apply review suggestions

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2022-07-04 15:52:18 +02:00
parent faa5dde25e
commit dcba440459
7 changed files with 9 additions and 34 deletions
@@ -959,7 +959,7 @@ describe('LunrSearchEngine', () => {
filters: {},
}),
).rejects.toThrow(
'Missing index for unknown. This means there are no documents to search through',
"Missing index for unknown. This could be because the index hasn't been created yet or there was a problem during index creation.",
);
});
});
@@ -170,7 +170,7 @@ export class LunrSearchEngine implements SearchEngine {
if (documentTypes?.length && !indexKeys.length) {
throw new MissingIndexError(
`Missing index for ${documentTypes?.toString()}. This means there are no documents to search through.`,
`Missing index for ${documentTypes?.toString()}. This could be because the index hasn't been created yet or there was a problem during index creation.`,
);
}