{"record":{"id":"10493559bea80d4f","repo":"windmill-labs/windmill","slug":"supabase-returned-no-connection-details-for-this-p","errorCode":null,"errorMessage":"Supabase returned no connection details for this project","messagePattern":"Supabase returned no connection details for this project","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/workspaceSettings/supabaseProvisioning.ts","lineNumber":194,"sourceCode":"\t}\n\tthrow new Error('Timed out waiting for the project to become reachable')\n}\n\n/**\n * The session-mode Supavisor endpoint of the project's primary database.\n *\n * Which pooler a project sits behind is assigned by Supabase, not derived from its\n * region: constructing `aws-0-<region>.pooler.supabase.com` is wrong for every project\n * that landed on another one, and the resulting resource never connects.\n */\nexport async function getSupabasePooler(token: string, projectId: string): Promise<SupabasePooler> {\n\tconst res = await fetch(`${base}/api/oauth/get_supabase_pooler/${projectId}`, {\n\t\theaders: headers(token)\n\t})\n\tconst configs: SupabasePooler[] = await unwrap(res, 'Could not read the connection details')\n\tconst primary = configs.filter((c) => c.database_type === 'PRIMARY')\n\tconst pooler = primary.find((c) => c.pool_mode === 'session') ?? primary[0] ?? configs[0]\n\tif (!pooler) throw new Error('Supabase returned no connection details for this project')\n\treturn pooler\n}\n\nexport type SupabaseConnection = {\n\tmode: SupabaseConnectionMode\n\tpooler?: SupabasePooler\n\t/** Why session pooling was asked for and not used. Absent when nothing was given up. */\n\tunavailable?: string\n}\n\n/**\n * The endpoint a project should be reached through, degrading rather than failing. Reading the\n * pooler config needs the `database_pooling_config_read` scope, which an instance's OAuth app\n * may not have. A direct connection still works where the workers have IPv6, so fall back to\n * it and say so.\n */\nexport async function resolveSupabaseConnection(\n\ttoken: string,","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/workspaceSettings/supabaseProvisioning.ts#L176-L212","documentation":"getSupabasePooler fetches the project's pooler connection configs from the Windmill backend (`/api/oauth/get_supabase_pooler/<projectId>`) and picks the PRIMARY session-mode pooler. If the response contains an empty list (no configs at all), it throws 'Supabase returned no connection details for this project'. This means Supabase (via the backend proxy) returned no usable database endpoints for the project.","triggerScenarios":"resolveSupabaseConnection calls getSupabasePooler for a project whose configs endpoint returns an empty array — typically a brand-new project whose database endpoints aren't published yet, or a project where pooler info is unavailable.","commonSituations":"Calling resolveSupabaseConnection immediately after project creation before Supabase publishes pooler configs; project paused/deleted; Supabase changed the pooler config payload shape (database_type/pool_mode fields) so filtering empties the list.","solutions":["Retry a minute later — fresh projects may not have pooler details published yet.","Confirm the project is ACTIVE_HEALTHY and not paused in the Supabase dashboard.","Verify the backend's Supabase Management API integration still matches the current pooler config response shape (database_type, pool_mode).","Check the project ID passed to get_supabase_pooler is the correct Supabase ref."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const configs = await getSupabasePoolerConfigs(token, projectId) // raw fetch\nif (!Array.isArray(configs) || configs.length === 0) {\n  throw new Error('project has no pooler configs yet — retry after ACTIVE_HEALTHY')\n}","typeGuard":"function hasPooler(c: SupabasePooler[] | undefined): c is [SupabasePooler, ...SupabasePooler[]] {\n  return Array.isArray(c) && c.length > 0\n}","tryCatchPattern":"try {\n  const conn = await resolveSupabaseConnection(token, projectId)\n} catch (e) {\n  if (e.message.includes('no connection details')) await waitUntilSupabaseHealthy(token, projectId)\n  else throw e\n}","preventionTips":["Only resolve the connection after the project reports ACTIVE_HEALTHY.","Handle paused projects: unpause in Supabase before connecting.","Keep backend Supabase integration updated with pooler API shape changes."],"tags":["supabase","database-connection","pooler","empty-response"],"backgroundTag":"missing-connection-details","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}