{"record":{"id":"13db732b640047a0","repo":"Mintplex-Labs/anything-llm","slug":"no-plugin-hubid-passed","errorCode":null,"errorMessage":"No plugin hubID passed.","messagePattern":"No plugin hubID passed\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/agents/imported.js","lineNumber":138,"sourceCode":"    const currentConfig = safeJsonParse(\n      fs.readFileSync(configLocation, \"utf8\"),\n      null\n    );\n    if (!currentConfig) return;\n\n    const { hubId: _drop, ...safeConfig } = config;\n    const updatedConfig = { ...currentConfig, ...safeConfig };\n    fs.writeFileSync(configLocation, JSON.stringify(updatedConfig, null, 2));\n    return updatedConfig;\n  }\n\n  /**\n   * Deletes a plugin. Removes the entire folder of the object.\n   * @param {string} hubId - The hub ID of the plugin.\n   * @returns {boolean} - True if the plugin was deleted, false otherwise.\n   */\n  static deletePlugin(hubId) {\n    if (!hubId) throw new Error(\"No plugin hubID passed.\");\n    const pluginFolder = path.resolve(pluginsPath, normalizePath(hubId));\n    if (!this.isValidLocation(pluginFolder)) return;\n    fs.rmSync(pluginFolder, { recursive: true });\n    return true;\n  }\n\n  /**\n  /**\n   * Validates if the handler.js file exists for the given plugin.\n   * @param {string} hubId - The hub ID of the plugin.\n   * @returns {boolean} - True if the handler.js file exists, false otherwise.\n   */\n  static validateImportedPluginHandler(hubId) {\n    const handlerLocation = path.resolve(\n      pluginsPath,\n      normalizePath(hubId),\n      \"handler.js\"\n    );","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/agents/imported.js#L120-L156","documentation":"Input guard in ImportedPlugin.deletePlugin: the required hubId argument is missing, so the plugin folder to delete cannot be located under the plugins root and the operation is refused before touching the filesystem.","triggerScenarios":"An imported plugin was invoked without its hubID.","commonSituations":"This error is raised at runtime in server/utils/agents/imported.js. It occurs when the required configuration for this provider is missing or invalid (unset environment variables, empty API key or base path), when the external service is unreachable or returns an unexpected response, or when invalid input reaches the call site. To prevent it, validate the relevant provider settings and environment variables at startup and confirm the service is reachable before this code path executes.","solutions":["Pass a valid hubID when loading the imported plugin.","Re-import the plugin from the community hub so its hubID is recorded."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}