{"record":{"id":"9a6a00a8da96d06e","repo":"paperclipai/paperclip","slug":"islocalpath-must-be-a-boolean-if-provided","errorCode":null,"errorMessage":"isLocalPath must be a boolean if provided","messagePattern":"isLocalPath must be a boolean if provided","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/src/routes/plugins.ts","lineNumber":1158,"sourceCode":"   */\n  router.post(\"/plugins/install\", async (req, res) => {\n    assertInstanceAdmin(req);\n    assertPluginManagementVisible();\n    const { packageName, version, isLocalPath } = req.body as PluginInstallRequest;\n\n    // Input validation\n    if (!packageName || typeof packageName !== \"string\") {\n      res.status(400).json({ error: \"packageName is required and must be a string\" });\n      return;\n    }\n\n    if (version !== undefined && typeof version !== \"string\") {\n      res.status(400).json({ error: \"version must be a string if provided\" });\n      return;\n    }\n\n    if (isLocalPath !== undefined && typeof isLocalPath !== \"boolean\") {\n      res.status(400).json({ error: \"isLocalPath must be a boolean if provided\" });\n      return;\n    }\n\n    // Validate package name format\n    const trimmedPackage = packageName.trim();\n    if (trimmedPackage.length === 0) {\n      res.status(400).json({ error: \"packageName cannot be empty\" });\n      return;\n    }\n\n    // Basic security check for package name (prevent injection)\n    if (!isLocalPath && /[<>:\"|?*]/.test(trimmedPackage)) {\n      res.status(400).json({ error: \"packageName contains invalid characters\" });\n      return;\n    }\n\n    // Cloud install floor: on harness-managed instances only bundled-catalog\n    // sources are installable, regardless of actor privileges or flag state.","sourceCodeStart":1140,"sourceCodeEnd":1176,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/routes/plugins.ts#L1140-L1176","documentation":"Error \"isLocalPath must be a boolean if provided\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/routes/plugins.ts:1142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the offending parameter to satisfy the constraint stated in the error message (type, range, or allowed values), then retry.","Refer to the route's request validation in the named file and the shared validators for the accepted format."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}