From 585724daea442e70c750ffc7ef6eff1ffd09caa6 Mon Sep 17 00:00:00 2001 From: Ali Waseem Date: Tue, 10 Mar 2026 11:44:04 -0600 Subject: [PATCH] fix(studio): skip empty SQL execution when saving Data API settings (#43605) When saving Data API settings with only max rows changes (no table/function privilege changes), updateExposedEntities sent an empty string to pg-meta/query which failed server-side validation with 'String must contain at least 1 character(s)'. Early return when there are no SQL parts to execute. --- apps/studio/data/privileges/update-exposed-entities-mutation.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/studio/data/privileges/update-exposed-entities-mutation.ts b/apps/studio/data/privileges/update-exposed-entities-mutation.ts index 85671da1795..b5768804ac7 100644 --- a/apps/studio/data/privileges/update-exposed-entities-mutation.ts +++ b/apps/studio/data/privileges/update-exposed-entities-mutation.ts @@ -41,6 +41,8 @@ export async function updateExposedEntities({ sqlParts.push(buildFunctionPrivilegesSql(functionNamesToRemove, 'revoke')) } + if (sqlParts.length === 0) return + await executeSql({ projectRef, connectionString,