The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
better errors
Copple89a601ac9328
diff --git a/apps/www/_blog/2022-08-16-supabase-js-v2.mdx b/apps/www/_blog/2022-08-16-supabase-js-v2.mdxindex 5ab71707c5c..b0b288a9277 100644--- a/apps/www/_blog/2022-08-16-supabase-js-v2.mdx+++ b/apps/www/_blog/2022-08-16-supabase-js-v2.mdx@@ -225,6 +225,24 @@ For example, Auth has a config parameter called "storageKey", which was was ofte</details>+### Better Errors++We've created error types for all of the sub-libraries in `supabase-js`. Here's a example for Edge Functions:++```ts+import { FunctionsHttpError, FunctionsRelayError, FunctionsFetchError } from '@supabase/supabase-js'++const { data: user, error } = await supabase.functions.invoke('hello')++if (error instanceof FunctionsHttpError) {+ console.log('Function returned an error', error.message)+} else if (error instanceof FunctionsRelayError) {+ console.log('Relay error:', error.message)+} else if (error instanceof FunctionsFetchError) {+ console.log('Fetch error:', error.message)+}+```+## CommunityVersion 2.0 is the result of the combined work of over 100 contributors to our libraries, and over 450 contributors to our docs and websites.