{"record":{"id":"4a0e25b3e69f1cf6","repo":"alibaba/nacos","slug":"parameter-validate-error-4a0e25","errorCode":"PARAMETER_VALIDATE_ERROR","errorMessage":"Plugin type and name are required","messagePattern":"Plugin type and name are required","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"warning","filePath":"console/src/main/java/com/alibaba/nacos/console/controller/v3/core/ConsolePluginController.java","lineNumber":133,"sourceCode":"        pluginProxy.updatePluginStatus(pluginType, pluginName, enabled, localOnly);\n        return Result.success(\"Plugin status updated successfully\");\n    }\n    \n    /**\n     * Update plugin configuration.\n     *\n     * @param form plugin config form\n     * @return success result\n     */\n    @Since(\"3.2.0\")\n    @PutMapping(\"/config\")\n    @Secured(resource = Constants.Resource.CONSOLE_RESOURCE_NAME_PREFIX\n        + \"plugins\", action = ActionTypes.WRITE, signType = SignType.CONSOLE,\n        apiType = ApiType.CONSOLE_API)\n    public Result<String> updatePluginConfig(PluginConfigForm form) throws NacosException {\n        if (StringUtils.isBlank(form.getPluginType())\n            || StringUtils.isBlank(form.getPluginName())) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),\n                ErrorCode.PARAMETER_VALIDATE_ERROR,\n                \"Plugin type and name are required\");\n        }\n        if (form.getConfig() == null) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),\n                ErrorCode.PARAMETER_VALIDATE_ERROR,\n                \"Plugin configuration is required\");\n        }\n        pluginProxy.updatePluginConfig(form.getPluginType(), form.getPluginName(), form.getConfig(),\n            form.isLocalOnly());\n        return Result.success(\"Plugin configuration updated successfully\");\n    }\n    \n    /**\n     * Get plugin availability across cluster nodes.\n     *\n     * @param pluginType plugin type\n     * @param pluginName plugin name","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/console/src/main/java/com/alibaba/nacos/console/controller/v3/core/ConsolePluginController.java#L115-L151","documentation":"Thrown by ConsolePluginController.updatePluginConfig (PUT /v3/console/core/.../plugins/config, @Since 3.2.0) when the PluginConfigForm has a blank pluginType or pluginName. It raises NacosApiException with HTTP 400 and ErrorCode.PARAMETER_VALIDATE_ERROR. Both fields are required because they form the plugin identity (pluginType:pluginName) used to look up and update the plugin config.","triggerScenarios":"PUTing a plugin-config update where pluginType or pluginName in the form is null, empty, or whitespace only.","commonSituations":"Frontend form submitting before a plugin is selected; misrouted request missing path/form parameters; a migration script that omits the plugin identity fields.","solutions":["Populate both pluginType and pluginName on the PluginConfigForm before submitting the PUT.","Add client-side validation to require both fields before enabling the submit action.","Confirm the form field names match the PluginConfigForm properties exactly."],"exampleFix":"// before\nform.setPluginType(\"auth\");\n// pluginName left blank\nproxy.updatePluginConfig(form);\n\n// after\nform.setPluginType(\"auth\");\nform.setPluginName(\"myAuthPlugin\");\nform.setConfig(Map.of(\"key\", \"value\"));\nproxy.updatePluginConfig(form);","handlingStrategy":"validation","validationCode":"// Validate plugin identity before submitting the update\nif (form.getPluginType() == null || form.getPluginType().isBlank()\n    || form.getPluginName() == null || form.getPluginName().isBlank()) {\n    throw new IllegalArgumentException(\"pluginType and pluginName are required\");\n}\npluginProxy.updatePluginConfig(form);","typeGuard":"// Java: boolean guard for required plugin identity\nboolean hasPluginIdentity = !StringUtils.isAnyBlank(form.getPluginType(), form.getPluginName());","tryCatchPattern":"try {\n    controller.updatePluginConfig(form);\n} catch (NacosApiException e) {\n    if (e.getDetailErrCode() == ErrorCode.PARAMETER_VALIDATE_ERROR.getCode()) {\n        // fix pluginType/pluginName and retry\n    } else { throw e; }\n}","preventionTips":["Require pluginType and pluginName in the form's own validate() before HTTP submission.","Disable the submit button in the UI until both fields are non-blank.","Centralize plugin-id validation in a shared helper reused by all plugin calls."],"tags":["validation","plugin","console","api"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}