Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: sentry capture profile creation errors (#33048)

Alaister Youngc4b6becdb9f1
diff --git a/apps/studio/lib/profile.tsx b/apps/studio/lib/profile.tsx
index 3f8ac40a503..e303b69d0ba 100644
--- a/apps/studio/lib/profile.tsx
+++ b/apps/studio/lib/profile.tsx
@@ -1,3 +1,4 @@
+import * as Sentry from '@sentry/nextjs'
import { useIsLoggedIn } from 'common'
import { useRouter } from 'next/router'
import { PropsWithChildren, createContext, useContext, useMemo } from 'react'
@@ -38,7 +39,10 @@ export const ProfileProvider = ({ children }: PropsWithChildren<{}>) => {
onSuccess: () => {
sendEvent({ action: TelemetryActions.SIGN_UP, properties: { category: 'conversion' } })
},
- onError: () => toast.error('Failed to create your profile. Please refresh to try again.'),
+ onError: (error) => {
+ Sentry.captureMessage('Failed to create users profile: ' + error.message)
+ toast.error('Failed to create your profile. Please refresh to try again.')
+ },
})
// Track telemetry for the current user