{"record":{"id":"12c0ec8eb55cec68","repo":"ruvnet/ruflo","slug":"convoy-not-found-validated-convoy-id","errorCode":null,"errorMessage":"Convoy not found: ${validated.convoy_id}","messagePattern":"Convoy not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/mcp-tools.ts","lineNumber":1736,"sourceCode":"  version: '0.1.0',\n  layer: 'wasm',\n  inputSchema: WasmOptimizeConvoyInputSchema,\n  handler: async (input, context): Promise<MCPToolResult<WasmOptimizeConvoyResult>> => {\n    const startTime = Date.now();\n\n    try {\n      const validated = WasmOptimizeConvoyInputSchema.parse(input);\n      const depWasm = context.bridges.dependencyWasm;\n      const bridge = context.bridges.gastown;\n\n      if (!depWasm.isInitialized()) {\n        await depWasm.initialize();\n      }\n\n      // Get convoy details\n      const convoys = await bridge.getConvoyStatus(validated.convoy_id, true);\n      if (convoys.length === 0) {\n        throw new Error(`Convoy not found: ${validated.convoy_id}`);\n      }\n\n      const convoy = convoys[0];\n\n      const wasmStart = Date.now();\n      const optimization = await depWasm.optimizeConvoy(\n        convoy,\n        validated.strategy,\n        validated.resource_constraints\n      );\n      const wasmDuration = Date.now() - wasmStart;\n\n      const result: WasmOptimizeConvoyResult = {\n        success: true,\n        optimization,\n        wasmPerformanceMs: wasmDuration,\n        durationMs: Date.now() - startTime,\n      };","sourceCodeStart":1718,"sourceCodeEnd":1754,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/mcp-tools.ts#L1718-L1754","documentation":"The wasm_optimize_convoy tool queried the convoy status for the validated convoy_id and got an empty list, meaning no convoy exists under that id. The tool refuses to run WASM optimization against a nonexistent convoy rather than fabricating a result.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/mcp-tools.ts:1736 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the referenced identifier exists before use (list available items and match against user input).","Return a clear 404-style error listing valid identifiers, and have the caller retry with an existing id."],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}