ruvnet/ruflo · error · BdBridgeError

PARSE_ERROR

PARSE_ERROR

Error message

Failed to parse bead output

What it means

parseSingleBead() ran JSON.parse/BeadSchema.parse on the bd command's output and it was not valid JSON or did not satisfy the Bead schema. The PARSE_ERROR wrapper carries the original parse error; the raw output's shape changed or was corrupt.

Source

Thrown at v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:691

    return beads;
  }

  /**
   * Parse single bead from JSON output
   */
  parseSingleBead(output: string): Bead {
    if (!output || output.trim() === '') {
      throw new BdBridgeError(
        'Empty output from bd command',
        'INVALID_OUTPUT'
      );
    }

    try {
      const parsed = JSON.parse(output);
      return BeadSchema.parse(parsed);
    } catch (error) {
      throw new BdBridgeError(
        'Failed to parse bead output',
        'PARSE_ERROR',
        undefined,
        undefined,
        error as Error
      );
    }
  }

  /**
   * List beads with optional query parameters
   */
  async listBeads(query?: BeadQuery): Promise<Bead[]> {
    this.ensureInitialized();

    const args = ['list', '--format', 'jsonl'];

    if (query?.type) {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Inspect the raw output that failed to parse; adjust the parser to the actual format or fix the producer.
  2. Validate output with a schema before parsing and log the raw payload on mismatch.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:691 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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