MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getCachedErrorChannel

Function getCachedErrorChannel

server/src/addie/error-notifier.ts:25–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23const CACHE_TTL_MS = 5 * 60_000;
24
25async function getCachedErrorChannel() {
26 const now = Date.now();
27 if (cachedErrorChannel && now < cacheExpiry) return cachedErrorChannel;
28 try {
29 cachedErrorChannel = await getErrorChannel();
30 cacheExpiry = now + CACHE_TTL_MS;
31 } catch {
32 // DB is down — use whatever we cached last
33 }
34 return cachedErrorChannel;
35}
36
37interface ToolErrorContext {
38 toolName: string;

Callers 2

_postToolErrorFunction · 0.85
_postSystemErrorFunction · 0.85

Calls 2

getErrorChannelFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected