0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-03 22:29:08 -05:00

chore: add error map

This commit is contained in:
bholmesdev 2024-01-18 11:34:42 -05:00 committed by Nate Moore
parent b8d19f93a1
commit 23cfda80fb

View file

@ -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;