Skip to content

Commit 43dcd07

Browse files
committed
fix(mcp): bound the setOauthRowUser write too so no step escapes the budget
The user-stamp write was the one DB op left unbounded on the start path; wrap it in timedStep(DB_STEP_MS) so every step stays inside the sub-30s budget and its timeout routes to the same 504.
1 parent d013b03 commit 43dcd07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/sim/app/api/mcp/oauth/start

apps/sim/app/api/mcp/oauth/start/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export const GET = withRouteHandler(
158158
)
159159
}
160160
if (row.userId !== userId) {
161-
await setOauthRowUser(row.id, userId)
161+
await timedStep('setOauthRowUser', DB_STEP_MS, () => setOauthRowUser(row.id, userId))
162162
row.userId = userId
163163
}
164164
const preregistered = await timedStep('loadPreregisteredClient', DB_STEP_MS, () =>

0 commit comments

Comments
 (0)