{"record":{"id":"8f30c688b3f0155e","repo":"ruvnet/ruflo","slug":"parse-error","errorCode":"PARSE_ERROR","errorMessage":"Failed to parse bead output","messagePattern":"Failed to parse bead output","errorType":"exception","errorClass":"BdBridgeError","httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts","lineNumber":691,"sourceCode":"    return beads;\n  }\n\n  /**\n   * Parse single bead from JSON output\n   */\n  parseSingleBead(output: string): Bead {\n    if (!output || output.trim() === '') {\n      throw new BdBridgeError(\n        'Empty output from bd command',\n        'INVALID_OUTPUT'\n      );\n    }\n\n    try {\n      const parsed = JSON.parse(output);\n      return BeadSchema.parse(parsed);\n    } catch (error) {\n      throw new BdBridgeError(\n        'Failed to parse bead output',\n        'PARSE_ERROR',\n        undefined,\n        undefined,\n        error as Error\n      );\n    }\n  }\n\n  /**\n   * List beads with optional query parameters\n   */\n  async listBeads(query?: BeadQuery): Promise<Bead[]> {\n    this.ensureInitialized();\n\n    const args = ['list', '--format', 'jsonl'];\n\n    if (query?.type) {","sourceCodeStart":673,"sourceCodeEnd":709,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts#L673-L709","documentation":"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.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/bridges/bd-bridge.ts:691 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the raw output that failed to parse; adjust the parser to the actual format or fix the producer.","Validate output with a schema before parsing and log the raw payload on mismatch."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}