diff --git a/common/src/supabase/utils.ts b/common/src/supabase/utils.ts index 26ea221f..fa7b54f9 100644 --- a/common/src/supabase/utils.ts +++ b/common/src/supabase/utils.ts @@ -66,7 +66,9 @@ export async function run( export async function run(q: PromiseLike | PostgrestResponse>) { const {data, count, error} = await q if (error != null) { - throw error + const err = new Error(error.message) + Object.assign(err, error) // copies code, details, hint onto the Error + throw err } else { return {data, count} }