Skip to content

Commit 7609e3d

Browse files
fix(mcp): narrow re-registration URL before the guarded update
1 parent 850a0e1 commit 7609e3d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎apps/sim/lib/mcp/orchestration/server-lifecycle.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ export async function createMcpServer(
271271
if (shouldClearOauth) await revokeMcpOauthTokens(serverId, params.workspaceId)
272272

273273
const checkedUrl = existingServer.url
274+
if (!checkedUrl) throw new Error(`MCP server ${serverId} has no URL to re-register against`)
274275
let updatedFields: string[] = []
275276
const rewritten = await db.transaction(async (tx) => {
276277
const updateValues: Partial<typeof mcpServers.$inferInsert> = {

0 commit comments

Comments
 (0)