tinyhumansai/openhuman · error

[composio-cache] catalog fetch failed; serving stale cache:

Error message

[composio-cache] catalog fetch failed; serving stale cache:

What it means

Fetching the Composio toolkit catalog failed and the cache served its last persisted copy instead: listToolkits rejected, so the caller receives the stale (possibly outdated) catalog rather than failing. The generation guard already ensured an invalidated mid-flight response would not poison the cache; this is the deliberate availability-over-freshness fallback when Composio/the network is unreachable.

Source

Thrown at app/src/lib/composio/catalogCache.ts:121

  const fetchPromise = listToolkits(options)
    .then(response => {
      // Only cache the response if no invalidation happened while it was in
      // flight; otherwise it belongs to a stale tenant. Still return it to
      // this caller — just don't poison the shared cache for future reads.
      if (generation === startGeneration) {
        writePersisted(response);
      } else {
        console.debug('[composio-cache] discarding catalog response invalidated mid-flight');
      }
      return response;
    })
    .catch(err => {
      // On failure, fall back to a stale cache if we have one rather than
      // forcing the UI into an error state for a list that rarely changes.
      // Skip the fallback if we were invalidated mid-flight — the cached
      // value belongs to the previous tenant.
      if (cached && generation === startGeneration) {
        console.warn(
          '[composio-cache] catalog fetch failed; serving stale cache:',
          err instanceof Error ? err.message : String(err)
        );
        return cached.response;
      }
      throw err;
    })
    .finally(() => {
      // Only clear the slot if it's still ours — an invalidation may have
      // reset `inflight` to null and a newer fetch taken its place.
      if (inflight === fetchPromise) {
        inflight = null;
      }
    });
  inflight = fetchPromise;
  return fetchPromise;
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Treat the stale catalog as temporary — the next successful fetch refreshes the persisted cache
  2. Check the warned error for network vs auth failure (expired Composio key rejects listToolkits)
  3. Verify Composio connectivity/credentials in connections settings if staleness persists
  4. The UI continues to work; toolkit lists may just lack newest additions
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at app/src/lib/composio/catalogCache.ts:121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/30ffc03431a82ed9. Report an issue: GitHub.