The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Fix query block read only catch (#35543)
Joshen Limff3832a6594c
diff --git a/apps/studio/components/ui/QueryBlock/QueryBlock.tsx b/apps/studio/components/ui/QueryBlock/QueryBlock.tsxindex b2d5fa639c4..99a885bec36 100644--- a/apps/studio/components/ui/QueryBlock/QueryBlock.tsx+++ b/apps/studio/components/ui/QueryBlock/QueryBlock.tsx@@ -167,9 +167,14 @@ export const QueryBlock = ({onSuccess: (data) => {onResults?.(data.result)setQueryResult(data.result)++ setReadOnlyError(false)+ setQueryError(undefined)},onError: (error) => {- if (error?.message.includes('permission denied')) {+ const permissionDenied = error.message.includes('permission denied')+ const notOwner = error.message.includes('must be owner')+ if (permissionDenied || notOwner) {setReadOnlyError(true)if (showRunButtonIfNotReadOnly) setShowWarning('hasWriteOperation')} else {