Skip to content

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

Fix create profile not triggering (#29790)

Joshen Limd455cda08501
diff --git a/apps/studio/lib/profile.tsx b/apps/studio/lib/profile.tsx
index 71722a81b79..eab9cd5e4ff 100644
--- a/apps/studio/lib/profile.tsx
+++ b/apps/studio/lib/profile.tsx
@@ -55,7 +55,7 @@ export const ProfileProvider = ({ children }: PropsWithChildren<{}>) => {
},
onError(err) {
// if the user does not yet exist, create a profile for them
- if (typeof err === 'object' && err !== null && 'code' in err && (err as any).code === 404) {
+ if (typeof err === 'object' && err !== null && err.message === "User's profile not found") {
createProfile()
}
},