The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: Add error codes reference docs for Flutter (#28567)
Tyler2fda5c8392be
diff --git a/apps/docs/docs/ref/dart/auth-error-codes.mdx b/apps/docs/docs/ref/dart/auth-error-codes.mdxnew file mode 100644index 00000000000..5708828d29a--- /dev/null+++ b/apps/docs/docs/ref/dart/auth-error-codes.mdx@@ -0,0 +1,12 @@+Supabase Auth can throw or return various errors when using the API. All errors originating from the `supabase.auth` namespace of the client library will be wrapped by the `AuthException` class.++Error objects are split in a few classes. `AuthApiException` is an exception which originates from the Supabase Auth API.++Errors originating from the server API classed as `AuthApiException` always have a `code` property that can be used to identify the error returned by the server. The `statusCode` property is also present, encoding the HTTP status code received in the response.++<AuthErrorCodesTable />++### Tips for better error handling++- Do not use string matching on error messages! Always use the error classes and `code` properties of error objects to identify the situation.+- Although HTTP status codes generally don't change, they can suddenly change due to bugs, so avoid relying on them unless absolutely necessary.diff --git a/apps/docs/spec/common-client-libs-sections.json b/apps/docs/spec/common-client-libs-sections.jsonindex 9360b867298..b395d123ed7 100644--- a/apps/docs/spec/common-client-libs-sections.json+++ b/apps/docs/spec/common-client-libs-sections.json@@ -406,7 +406,6 @@"type": "markdown","excludes": ["reference_dart_v1",- "reference_dart_v2","reference_python_v2","reference_swift_v1","reference_swift_v2"