aboutsummaryrefslogtreecommitdiff
path: root/packages/db/src/runtime/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/db/src/runtime/utils.ts')
-rw-r--r--packages/db/src/runtime/utils.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/db/src/runtime/utils.ts b/packages/db/src/runtime/utils.ts
index 29160b22d..ac6cfeda6 100644
--- a/packages/db/src/runtime/utils.ts
+++ b/packages/db/src/runtime/utils.ts
@@ -1,3 +1,5 @@
+import { AstroError } from 'astro/errors';
+
/**
* Small wrapper around fetch that throws an error if the response is not OK. Allows for custom error handling as well through the onNotOK callback.
*/
@@ -16,3 +18,7 @@ export async function safeFetch(
return response;
}
+
+export class AstroDbError extends AstroError {
+ name = 'Astro DB Error';
+}