Priority: P3 · Package: bb-data
Env-var validation surfaces an Aurora-specific error message on the Supabase path. Not a functional bug on the correctly-generated Supabase app — keeping open for the polish fix below.
Verified still present on main (e98bab4, 2026-06-19). The env-var prefix is now BLOCKS_ (renamed from KIT_).
What happens
The only Aurora-specific runtime error is thrown by createDataApiEngine():
packages/bb-data/src/index.aws.ts#L88-L91
Missing environment variables: BLOCKS_{id}_CLUSTER_ARN and/or BLOCKS_{id}_SECRET_ARN. These are injected by the CDK layer — ensure the Database is provisioned.
This branch is reached only when the connection has no connectionString. _initBase() routes any connectionString connection to PgClientEngine, and the generated Supabase supabase.ts always uses connection: fromExisting({ connectionString: dbUrl }) — so a correctly-generated Supabase app never hits the Aurora message (not reproducible on the generated path):
packages/bb-data/src/index.aws.ts#L65-L71
if (conn && 'connectionString' in conn) {
// ... → PgClientEngine (Supabase / external Postgres path)
return new RLSEnabledDatabase(new PgClientEngine({ connectionString, ssl: { rejectUnauthorized: false } }));
}
return new RLSEnabledDatabase(this.createDataApiEngine(envName, conn)); // ← Aurora-only branch
Residual & fix
The message/JSDoc is Aurora-centric and would be confusing if a misconfiguration routed a Supabase user down the Data API branch.
Fix: detect the external/connectionString intent and emit a Supabase-appropriate error message.
Priority: P3 · Package:
bb-dataEnv-var validation surfaces an Aurora-specific error message on the Supabase path. Not a functional bug on the correctly-generated Supabase app — keeping open for the polish fix below.
What happens
The only Aurora-specific runtime error is thrown by
createDataApiEngine():packages/bb-data/src/index.aws.ts#L88-L91This branch is reached only when the connection has no
connectionString._initBase()routes anyconnectionStringconnection toPgClientEngine, and the generated Supabasesupabase.tsalways usesconnection: fromExisting({ connectionString: dbUrl })— so a correctly-generated Supabase app never hits the Aurora message (not reproducible on the generated path):packages/bb-data/src/index.aws.ts#L65-L71Residual & fix
The message/JSDoc is Aurora-centric and would be confusing if a misconfiguration routed a Supabase user down the Data API branch.
Fix: detect the external/
connectionStringintent and emit a Supabase-appropriate error message.