ruvnet/ruflo · error · Error

Resource not found: ${uri}

Error message

Resource not found: ${uri}

What it means

ResourceRegistry.read() found no handler registered for the URI — neither an exact match nor a matching URI template. The read fails as unknown-resource after the cache miss; the URI in the message shows what was requested.

Source

Thrown at v3/@claude-flow/mcp/src/resource-registry.ts:174

   */
  async read(uri: string): Promise<ResourceReadResult> {
    // Check cache first
    if (this.options.cacheEnabled) {
      const cached = this.cache.get(uri);
      if (cached && Date.now() - cached.cachedAt < cached.ttl) {
        this.logger.debug('Resource cache hit', { uri });
        return { contents: cached.content };
      }
    }

    // Find handler (exact match or template match)
    let handler = this.handlers.get(uri);
    if (!handler) {
      handler = this.findTemplateHandler(uri);
    }

    if (!handler) {
      throw new Error(`Resource not found: ${uri}`);
    }

    const contents = await handler(uri);

    // Cache the result with size limit (LRU eviction)
    if (this.options.cacheEnabled) {
      // SECURITY: Enforce max cache size to prevent memory exhaustion
      if (this.cache.size >= this.options.maxCacheSize) {
        // Remove oldest entry (first entry in Map iteration order)
        const oldestKey = this.cache.keys().next().value;
        if (oldestKey) {
          this.cache.delete(oldestKey);
          this.logger.debug('Cache evicted oldest entry', { uri: oldestKey });
        }
      }

      this.cache.set(uri, {
        content: contents,

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Register the resource under the requested URI before reading it.
  2. Verify the URI spelling and scheme against the registered resource list.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/@claude-flow/mcp/src/resource-registry.ts:174 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/b30874b6895eaadd. Report an issue: GitHub.