MCPcopy
hub / github.com/simstudioai/sim / markCredentialDead

Function markCredentialDead

apps/sim/lib/oauth/terminal-errors.ts:28–40  ·  view source on GitHub ↗
(accountId: string, code: string)

Source from the content-addressed store, hash-verified

26}
27
28export async function markCredentialDead(accountId: string, code: string): Promise<void> {
29 const redis = getRedisClient()
30 if (!redis) return
31 try {
32 await redis.set(deadKey(accountId), code, 'EX', DEAD_CACHE_TTL_SEC)
33 } catch (error) {
34 logger.warn('Failed to mark credential dead in Redis', {
35 accountId,
36 code,
37 error: toError(error).message,
38 })
39 }
40}
41
42export async function getRecentTerminalError(accountId: string): Promise<string | null> {
43 const redis = getRedisClient()

Callers 2

performCoalescedRefreshFunction · 0.90

Calls 5

getRedisClientFunction · 0.90
toErrorFunction · 0.90
deadKeyFunction · 0.85
setMethod · 0.65
warnMethod · 0.65

Tested by

no test coverage detected