fix(build): Improve error message.

This commit is contained in:
SamTolmay 2021-06-17 14:17:07 +02:00
parent 933e4fa35a
commit 258d4adc29
2 changed files with 2 additions and 2 deletions

View File

@ -1123,7 +1123,7 @@ describe('build requests', () => {
],
};
await expect(buildPages({ components, context })).rejects.toThrow(
'Request "my.request" includes a period (".")'
'Request id "my.request" should not include a period (".").'
);
});

View File

@ -28,7 +28,7 @@ function buildRequest({ request, blockContext }) {
);
}
if (request.id.includes('.')) {
throw new Error(`Request "${request.id}" includes a period (".")`);
throw new Error(`Request id "${request.id}" should not include a period (".").`);
}
request.auth = blockContext.auth;