{"record":{"id":"4f9b2b53490e1a3b","repo":"ruvnet/ruflo","slug":"itemids-array-required","errorCode":null,"errorMessage":"itemIds array required","messagePattern":"itemIds array required","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"v3/@claude-flow/cli/cloud-functions/publish-registry/index.js","lineNumber":461,"sourceCode":"          const ratings = JSON.parse(content.toString());\n\n          return res.json({\n            itemId,\n            average: Math.round(ratings.average * 10) / 10,\n            count: ratings.count,\n            // Don't expose individual user ratings\n          });\n        } catch {\n          return res.json({ itemId, average: 0, count: 0 });\n        }\n      }\n\n      case 'bulk-ratings': {\n        // Get ratings for multiple items at once\n        const { itemIds, itemType = 'plugin' } = req.body || req.query;\n\n        if (!itemIds || !Array.isArray(itemIds)) {\n          return res.status(400).json({ error: 'itemIds array required' });\n        }\n\n        const results = {};\n\n        for (const itemId of itemIds.slice(0, 50)) { // Limit to 50 items\n          try {\n            const ratingsFile = bucket.file(`ratings/${itemType}/${itemId}.json`);\n            const [exists] = await ratingsFile.exists();\n\n            if (exists) {\n              const [content] = await ratingsFile.download();\n              const ratings = JSON.parse(content.toString());\n              results[itemId] = {\n                average: Math.round(ratings.average * 10) / 10,\n                count: ratings.count,\n              };\n            } else {\n              results[itemId] = { average: 0, count: 0 };","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/cloud-functions/publish-registry/index.js#L443-L479","documentation":"The 'bulk-ratings' action found itemIds missing or not an array in body/query. Input guard: batch rating lookup requires a list of item ids to iterate; a scalar or absent value is rejected with 400 before the per-item GCS reads begin.","triggerScenarios":"Thrown at v3/@claude-flow/cli/cloud-functions/publish-registry/index.js:461 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide all required parameters listed in the message.","Validate required fields before dispatch and report the full set of missing fields at once."],"exampleFix":null,"handlingStrategy":"type-guard","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"}