From 23cfda80fbc70484e806458f8831562e8f4ebb87 Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Thu, 18 Jan 2024 11:34:42 -0500 Subject: [PATCH] chore: add error map --- packages/db/src/integration.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/db/src/integration.ts b/packages/db/src/integration.ts index d9384ad69e..02998bf1a5 100644 --- a/packages/db/src/integration.ts +++ b/packages/db/src/integration.ts @@ -9,6 +9,7 @@ import { createDb, setupDbTables } from './internal.js'; import { astroConfigWithDbSchema } from './config.js'; import { getAstroStudioEnv, type VitePlugin } from './utils.js'; import { appTokenError } from './errors.js'; +import { errorMap } from './error-map.js'; export function integration(): AstroIntegration { return { @@ -19,7 +20,7 @@ export function integration(): AstroIntegration { // TODO: refine where we load collections // @matthewp: may want to load collections by path at runtime - const configWithDb = astroConfigWithDbSchema.parse(config); + const configWithDb = astroConfigWithDbSchema.parse(config, { errorMap }); const collections = configWithDb.db?.collections ?? {}; const studio = configWithDb.db?.studio ?? false;