Skip to content

Commit 4fbb88e

Browse files
committed
address comments
1 parent 3331547 commit 4fbb88e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/sim/lib/mcp/oauth/storage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ export async function withMcpOauthRefreshLock<T>(rowId: string, fn: () => Promis
276276

277277
let queueTimedOut = false
278278
const next = prevSettled.then(() => {
279-
if (queueTimedOut) return undefined
279+
if (queueTimedOut) {
280+
throw new Error(`MCP OAuth refresh queue for ${rowId} abandoned after timeout`)
281+
}
280282
return runWithRedisMutex(lockKey, rowId, fn)
281283
})
282284
inflightChains.set(lockKey, next)
@@ -304,7 +306,7 @@ export async function withMcpOauthRefreshLock<T>(rowId: string, fn: () => Promis
304306
clearTimeout(queueTimer)
305307
}
306308

307-
return next as Promise<T>
309+
return next
308310
}
309311

310312
async function runWithRedisMutex<T>(

0 commit comments

Comments
 (0)