{"record":{"id":"9a60ef3dc009e20d","repo":"coleam00/Archon","slug":"marketplace-response-contains-invalid-entries","errorCode":null,"errorMessage":"Marketplace response contains invalid entries","messagePattern":"Marketplace response contains invalid entries","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/workflow.ts","lineNumber":5010,"sourceCode":"    const err = error as Error;\n    throw new Error(`Cannot reach marketplace at ${url}: ${err.message}`);\n  }\n  if (!res.ok) {\n    throw new Error(`Marketplace fetch failed: HTTP ${String(res.status)} from ${url}`);\n  }\n  const raw: unknown = await res.json();\n  if (!Array.isArray(raw)) {\n    throw new Error('Unexpected marketplace response format (expected array)');\n  }\n  for (const item of raw) {\n    if (\n      typeof item !== 'object' ||\n      item === null ||\n      typeof (item as Record<string, unknown>).slug !== 'string' ||\n      typeof (item as Record<string, unknown>).sourceUrl !== 'string' ||\n      !Array.isArray((item as Record<string, unknown>).tags)\n    ) {\n      throw new Error('Marketplace response contains invalid entries');\n    }\n  }\n  return raw as MarketplaceEntryJson[];\n}\n\nexport async function workflowSearchCommand(query?: string, json?: boolean): Promise<void> {\n  const entries = await fetchMarketplace();\n\n  const results = query\n    ? entries.filter(e => {\n        const q = query.toLowerCase();\n        return (\n          e.name.toLowerCase().includes(q) ||\n          e.author.toLowerCase().includes(q) ||\n          e.description.toLowerCase().includes(q) ||\n          e.tags.some(t => t.toLowerCase().includes(q))\n        );\n      })","sourceCodeStart":4992,"sourceCodeEnd":5028,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/cli/src/commands/workflow.ts#L4992-L5028","documentation":"Error \"Marketplace response contains invalid entries\" thrown in coleam00/Archon.","triggerScenarios":"Thrown at packages/cli/src/commands/workflow.ts:5010 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}