{"record":{"id":"6b4ad60c3e72ab43","repo":"alibaba/spring-ai-alibaba","slug":"missing-params-6b4ad6","errorCode":"MISSING_PARAMS","errorMessage":"pluginId","messagePattern":"pluginId","errorType":"error_code","errorClass":"BizException","httpStatus":null,"severity":"error","filePath":"spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/PluginController.java","lineNumber":107,"sourceCode":"\tpublic Result<Void> updatePlugin(@PathVariable(\"pluginId\") String pluginId, @RequestBody Plugin request) {\n\t\tRequestContext context = RequestContextHolder.getRequestContext();\n\t\tvalidatePlugin(request);\n\n\t\trequest.setPluginId(pluginId);\n\t\tpluginService.updatePlugin(request);\n\t\treturn Result.success(context.getRequestId(), null);\n\t}\n\n\t/**\n\t * Deletes a plugin\n\t * @param pluginId ID of the plugin to delete\n\t */\n\t@DeleteMapping(\"/plugins/{pluginId}\")\n\tpublic Result<Void> deletePlugin(@PathVariable(\"pluginId\") String pluginId) {\n\t\tRequestContext context = RequestContextHolder.getRequestContext();\n\n\t\tif (Objects.isNull(pluginId)) {\n\t\t\tthrow new BizException(ErrorCode.MISSING_PARAMS.toError(\"pluginId\"));\n\t\t}\n\n\t\tpluginService.deletePlugin(pluginId);\n\t\treturn Result.success(context.getRequestId(), null);\n\t}\n\n\t/**\n\t * Retrieves a plugin by ID\n\t * @param pluginId ID of the plugin to retrieve\n\t * @return Plugin details\n\t */\n\t@GetMapping(\"/plugins/{pluginId}\")\n\tpublic Result<Plugin> getPlugin(@PathVariable(\"pluginId\") String pluginId) {\n\t\tRequestContext context = RequestContextHolder.getRequestContext();\n\n\t\tif (Objects.isNull(pluginId)) {\n\t\t\tthrow new BizException(ErrorCode.MISSING_PARAMS.toError(\"pluginId\"));\n\t\t}","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/alibaba/spring-ai-alibaba/blob/f82da0b50f35744c13968191be2b1cd2452ef550/spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/controller/PluginController.java#L89-L125","documentation":"MISSING_PARAMS BizException from PluginController.deletePlugin when the {pluginId} path variable is null. pluginId identifies the plugin to delete; the controller performs a null check (note: not a blank-string check) and rejects with a named-field business error before calling pluginService.deletePlugin.","triggerScenarios":"DELETE to /plugins/ with a missing or null pluginId path segment, typically from a client interpolating an unset variable into the URL.","commonSituations":"JS template strings with an undefined pluginId; table row actions wired to the wrong data key; replayed requests after the plugin record's id was renamed.","solutions":["Supply the real pluginId in the DELETE path: /plugins/{pluginId}.","Fetch the id from the plugin list endpoint if unknown.","Client-side: skip/throw when pluginId is null or empty before building the URL."],"exampleFix":"// before\nawait api.delete(`/plugins/${pluginId}`); // pluginId null -> DELETE /plugins/\n\n// after\nif (!pluginId) throw new Error('pluginId required');\nawait api.delete(`/plugins/${encodeURIComponent(pluginId)}`);","handlingStrategy":"validation","validationCode":"if (pluginId == null || pluginId === '') throw new Error('pluginId is required to delete a plugin');","typeGuard":"function hasPluginId(p) { return typeof p === 'string' && p.trim() !== ''; }","tryCatchPattern":"try {\n  await api.deletePlugin(pluginId);\n} catch (e) {\n  if (e.code === 'MISSING_PARAMS' && e.message === 'pluginId') {\n    // refresh plugin list and re-bind the row id\n  } else throw e;\n}","preventionTips":["Bind delete actions to the row's id field explicitly, not a generic record key.","Check id presence before enabling destructive actions.","Note the controller only null-checks here — always send a real id string."],"tags":["plugin","validation","path-variable","spring"],"backgroundTag":"null-argument","analyzedSha":"f82da0b50f35744c13968191be2b1cd2452ef550","analyzedAt":"2026-09-09T15:32:42.421Z","contentChangedAt":"2026-09-09T15:32:42.421Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}