0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

[ci] format

This commit is contained in:
Charles Villard 2023-12-06 12:14:25 +00:00 committed by astrobot-houston
parent edfae50e6e
commit 58d643bcd8

View file

@ -109,22 +109,21 @@ async function validateRssOptions(rssOptions: RSSOptions) {
const formattedError = new Error(
[
`[RSS] Invalid or missing options:`,
...parsedResult.error.errors.map(
(zodError) => {
const path = zodError.path.join('.');
const message = `${zodError.message} (${path})`;
const code = zodError.code;
...parsedResult.error.errors.map((zodError) => {
const path = zodError.path.join('.');
const message = `${zodError.message} (${path})`;
const code = zodError.code;
if (path === 'items' && code === 'invalid_union') {
return [
message,
if (path === 'items' && code === 'invalid_union') {
return [
message,
`The \`items\` property requires properly typed \`title\`, \`pubDate\`, and \`link\` keys.`,
`Check your collection's schema, and visit https://docs.astro.build/en/guides/rss/#generating-items for more info.`
].join('\n')
}
`Check your collection's schema, and visit https://docs.astro.build/en/guides/rss/#generating-items for more info.`,
].join('\n');
}
return message;
}),
return message;
}),
].join('\n')
);
throw formattedError;