From ff3816acc8eef54af89af95f30ab1c90e249d6ae Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Wed, 14 Feb 2024 13:01:36 -0500 Subject: [PATCH] fix: better error message --- packages/db/src/core/queries.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/db/src/core/queries.ts b/packages/db/src/core/queries.ts index 5f92edcf1a..b35f2d09e0 100644 --- a/packages/db/src/core/queries.ts +++ b/packages/db/src/core/queries.ts @@ -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?` ); }