aboutsummaryrefslogtreecommitdiff
path: root/packages/db/src/runtime/errors.ts
diff options
context:
space:
mode:
authorGravatar Ben Holmes <hey@bholmes.dev> 2024-04-01 17:02:36 -0400
committerGravatar GitHub <noreply@github.com> 2024-04-01 17:02:36 -0400
commit504d15d77291f0fe36aa9fecc22f276b734f83cb (patch)
tree4c9b5ab07e5910fb70d0d70ed48f449aec71e024 /packages/db/src/runtime/errors.ts
parent17badaf55c79cec460c74f4da58bf188eedef7e3 (diff)
downloadastro-504d15d77291f0fe36aa9fecc22f276b734f83cb.tar.gz
astro-504d15d77291f0fe36aa9fecc22f276b734f83cb.tar.zst
astro-504d15d77291f0fe36aa9fecc22f276b734f83cb.zip
db: Better error messages when querying remote (#10636)
* feat: clear error messages on remote db error * refactor: use AstroDbError for correct error name * refactor: errorMessage -> responseMessage * chore: changeset * fix: revert seed file change * fix: format seed errors as AstroDbError * fix: correctly log eager seed errors
Diffstat (limited to 'packages/db/src/runtime/errors.ts')
-rw-r--r--packages/db/src/runtime/errors.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/packages/db/src/runtime/errors.ts b/packages/db/src/runtime/errors.ts
index 2026e57e9..51febbff4 100644
--- a/packages/db/src/runtime/errors.ts
+++ b/packages/db/src/runtime/errors.ts
@@ -24,10 +24,6 @@ export const REFERENCE_DNE_ERROR = (columnName: string) => {
)} references a table that does not exist. Did you apply the referenced table to the \`tables\` object in your db config?`;
};
-export const SEED_ERROR = (error: string) => {
- return `${red(`Error while seeding database:`)}\n\n${error}`;
-};
-
export const SEED_DEFAULT_EXPORT_ERROR = (fileName: string) => {
- return SEED_ERROR(`Missing default function export in ${bold(fileName)}`);
+ return `Missing default function export in ${bold(fileName)}`;
};