0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

fix: better error message

This commit is contained in:
bholmesdev 2024-02-14 13:01:36 -05:00
parent d5b794564a
commit ff3816acc8

View file

@ -178,7 +178,7 @@ export function getModifiers(fieldName: string, field: DBField) {
const { collection, name } = references.schema;
if (!collection || !name) {
throw new Error(
`Invalid reference for field ${fieldName}. This is an unexpected error that should be reported to the Astro team.`
`Field ${collection}.${name} references a collection that does not exist. Did you apply the referenced collection to the \`collections\` object in your Astro config?`
);
}