{"record":{"id":"a8b0f9739073fb92","repo":"ruvnet/ruflo","slug":"error-message","errorCode":null,"errorMessage":"error.message","messagePattern":"error\\.message","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"v3/@claude-flow/cli/cloud-functions/publish-registry/index.js","lineNumber":494,"sourceCode":"                count: ratings.count,\n              };\n            } else {\n              results[itemId] = { average: 0, count: 0 };\n            }\n          } catch {\n            results[itemId] = { average: 0, count: 0 };\n          }\n        }\n\n        return res.json(results);\n      }\n\n      default:\n        return res.status(400).json({ error: `Unknown action: ${action}` });\n    }\n  } catch (error) {\n    console.error('Function error:', error);\n    return res.status(500).json({ error: error.message });\n  }\n}\n\n// For local testing\nexport { signRegistry, fetchNpmStats, trackEvent };\n","sourceCodeStart":476,"sourceCodeEnd":500,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/cloud-functions/publish-registry/index.js#L476-L500","documentation":"Top-level catch-all of the publish-registry function: any unhandled exception from the executed action (IPFS pinning failure, GCS error, JSON parse error) is logged as 'Function error' and returned as a 500 with the raw error.message. It is a generic wrapper — the real cause is whatever exception the action threw.","triggerScenarios":"Thrown at v3/@claude-flow/cli/cloud-functions/publish-registry/index.js:494 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Propagate the real underlying error message instead of a placeholder; log the full stack for diagnosis."],"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"}