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.
This commit is contained in:
Ali Waseem authored and GitHub committed 2026-03-10 17:44:04 +00:00
1 parent 2d68b69c76
commit 585724daea
1 file changed
+2
@@ -41,6 +41,8 @@ export async function updateExposedEntities({
sqlParts.push(buildFunctionPrivilegesSql(functionNamesToRemove, 'revoke'))
}
if (sqlParts.length === 0) return
await executeSql({
projectRef,
connectionString,