mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
[ci] format
This commit is contained in:
parent
edfae50e6e
commit
58d643bcd8
1 changed files with 12 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue