diff options
author | 2024-04-01 17:02:36 -0400 | |
---|---|---|
committer | 2024-04-01 17:02:36 -0400 | |
commit | 504d15d77291f0fe36aa9fecc22f276b734f83cb (patch) | |
tree | 4c9b5ab07e5910fb70d0d70ed48f449aec71e024 /packages/db/src/utils.ts | |
parent | 17badaf55c79cec460c74f4da58bf188eedef7e3 (diff) | |
download | astro-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/utils.ts')
-rw-r--r-- | packages/db/src/utils.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/db/src/utils.ts b/packages/db/src/utils.ts index 4e1a18685..1e7b00b12 100644 --- a/packages/db/src/utils.ts +++ b/packages/db/src/utils.ts @@ -1,2 +1,8 @@ +import { AstroError } from 'astro/errors'; + export { defineDbIntegration } from './core/utils.js'; export { asDrizzleTable } from './runtime/index.js'; + +export class AstroDbError extends AstroError { + name = 'Astro DB Error'; +} |