[Discover] Change error message when no indices match a given data view (#126158)

This commit is contained in:
Matthias Wilhelm 2022-02-23 21:09:05 +01:00 committed by GitHub
parent b0cdbd9452
commit 78103870bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ export function isEsIndexNotFoundError(err: any) {
* @return {Boom}
*/
export function createNoMatchingIndicesError(pattern: string[] | string) {
const err = Boom.notFound(`No indices match pattern "${pattern}"`);
const err = Boom.notFound(`No indices match "${pattern}"`);
(err.output.payload as any).code = ERR_NO_MATCHING_INDICES;
return err;
}

View file

@ -43,7 +43,7 @@ export default function ({ getService }) {
{ sort: false }
)}`;
({ body } = await supertest.get(uri).expect(404));
expect(body.message).to.contain('No indices match pattern "foo"');
expect(body.message).to.contain('No indices match "foo"');
});
});