diff --git a/src/app/api/setup/supabase/project/route.ts b/src/app/api/setup/supabase/project/route.ts index 2df9a16..f3f946b 100644 --- a/src/app/api/setup/supabase/project/route.ts +++ b/src/app/api/setup/supabase/project/route.ts @@ -27,6 +27,6 @@ export async function POST(request: Request) { return NextResponse.json(await fillFrom(id)); } catch (e) { console.error("[broke] supabase project:", e instanceof Error ? e.message : e); - return NextResponse.json({ error: e instanceof Error && /cost money|organization/.test(e.message) ? e.message : "Supabase didn't answer. Try again in a moment." }, { status: 502 }); + return NextResponse.json({ error: e instanceof Error && /cost money|organization|free projects/.test(e.message) ? e.message : "Supabase didn't answer. Try again in a moment." }, { status: 502 }); } } diff --git a/src/lib/supabase-mcp.ts b/src/lib/supabase-mcp.ts index c90567e..99e6f57 100644 --- a/src/lib/supabase-mcp.ts +++ b/src/lib/supabase-mcp.ts @@ -175,6 +175,16 @@ async function callFit(client: Client, name: string, pool: Record { try { const c = JSON.parse(confirm) as { confirm_cost_id?: string; id?: string }; return c.confirm_cost_id ?? c.id; } catch { return confirm.match(/[A-Za-z0-9_-]{16,}/)?.[0] ?? confirm.trim(); } })(); + pool.confirm_cost_id = (() => { try { const c = JSON.parse(confirm) as { confirmation_id?: string; confirm_cost_id?: string; id?: string }; return c.confirmation_id ?? c.confirm_cost_id ?? c.id; } catch { return confirm.match(/[A-Za-z0-9_-]{16,}/)?.[0] ?? confirm.trim(); } })(); made = one(await callFit(client, "create_project", pool)); } for (let i = 0; i < 60; i++) {