(accountId: string)
| 40 | } |
| 41 | |
| 42 | export async function getRecentTerminalError(accountId: string): Promise<string | null> { |
| 43 | const redis = getRedisClient() |
| 44 | if (!redis) return null |
| 45 | try { |
| 46 | return await redis.get(deadKey(accountId)) |
| 47 | } catch (error) { |
| 48 | logger.warn('Failed to read terminal error flag from Redis', { |
| 49 | accountId, |
| 50 | error: toError(error).message, |
| 51 | }) |
| 52 | return null |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | export async function clearDeadFlag(accountId: string): Promise<void> { |
| 57 | const redis = getRedisClient() |
no test coverage detected