MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / setErrorOnlyCacheEntry

Function setErrorOnlyCacheEntry

cli/src/hooks/use-activity-query.ts:587–599  ·  view source on GitHub ↗
(
  queryKey: readonly unknown[],
  error: Error,
  errorUpdatedAt?: number,
)

Source from the content-addressed store, hash-verified

585 * This simulates what happens when a fetch fails with no prior successful data.
586 */
587export function setErrorOnlyCacheEntry(
588 queryKey: readonly unknown[],
589 error: Error,
590 errorUpdatedAt?: number,
591): void {
592 const key = serializeQueryKey(queryKey)
593 setCacheEntry(key, {
594 data: undefined,
595 dataUpdatedAt: 0,
596 error,
597 errorUpdatedAt: errorUpdatedAt ?? Date.now(),
598 })
599}
600
601/**
602 * Test helpers for verifying retry behavior.

Callers 1

Calls 2

serializeQueryKeyFunction · 0.85
setCacheEntryFunction · 0.85

Tested by

no test coverage detected