ruvnet/ruflo · error · GtBridgeError

INVALID_OUTPUT

INVALID_OUTPUT

Error message

Empty output from gt command

What it means

parseGtOutput() was handed command output that is empty or whitespace-only, leaving nothing to JSON-parse. INVALID_OUTPUT is raised before parsing; the gt command printed nothing usable (wrong flags or silent failure).

Source

Thrown at v3/plugins/gastown-bridge/src/bridges/gt-bridge.ts:529

          success: false,
          error: err.stderr || err.message,
          command: 'gt',
          args: validatedArgs,
          durationMs,
        };
      }
    });
  }

  /**
   * Parse JSON output from gt command
   *
   * @param output - Raw command output
   * @returns Parsed JSON object
   */
  parseGtOutput<T>(output: string): T {
    if (!output || output.trim() === '') {
      throw new GtBridgeError(
        'Empty output from gt command',
        'INVALID_OUTPUT'
      );
    }

    // Check parsed cache first
    const cacheKey = hashArgs([output]);
    const cached = parsedCache.get(cacheKey);
    if (cached !== undefined) {
      return cached as T;
    }

    try {
      // Try to parse as JSON
      const parsed = JSON.parse(output) as T;
      parsedCache.set(cacheKey, parsed);
      return parsed;
    } catch {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Verify the command produces output for the given arguments; run it manually to inspect stdout/stderr.
  2. Handle empty output as a valid empty result where the domain allows it instead of throwing.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/plugins/gastown-bridge/src/bridges/gt-bridge.ts:529 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/0f50a9a7ed8e3075. Report an issue: GitHub.