The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: suppress misleading toast when navigating away from a deleted project (#44032)
Charis634bd2760ff7
diff --git a/apps/studio/components/interfaces/App/RouteValidationWrapper.tsx b/apps/studio/components/interfaces/App/RouteValidationWrapper.tsxindex 617d3cad4ed..6d8b2a124a2 100644--- a/apps/studio/components/interfaces/App/RouteValidationWrapper.tsx+++ b/apps/studio/components/interfaces/App/RouteValidationWrapper.tsx@@ -52,7 +52,7 @@ export const RouteValidationWrapper = ({ children }: PropsWithChildren<{}>) => {return excemptUrls.includes(router?.pathname)}- const { isError: isErrorProject } = useProjectDetailQuery({ ref })+ const { isError: isErrorProject, error: projectError } = useProjectDetailQuery({ ref })const { data: organizations, isSuccess: orgsInitialized } = useOrganizationsQuery({enabled: isLoggedIn,@@ -82,7 +82,10 @@ export const RouteValidationWrapper = ({ children }: PropsWithChildren<{}>) => {// A successful request to project details will validate access to both project and branchesif (!!ref && isErrorProject) {- toast.error('You do not have access to this project')+ // 404 means the project no longer exists (e.g. was deleted), not an access error+ if (projectError?.code !== 404) {+ toast.error('You do not have access to this project')+ }router.push(DEFAULT_HOME)return}