(accountId: string, code: string)
| 26 | } |
| 27 | |
| 28 | export 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 | |
| 42 | export async function getRecentTerminalError(accountId: string): Promise<string | null> { |
| 43 | const redis = getRedisClient() |
no test coverage detected