alibaba/nacos · warning · NacosApiException

PARAMETER_VALIDATE_ERROR

PARAMETER_VALIDATE_ERROR

Error message

Plugin type and name are required

What it means

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.

Source

Thrown at console/src/main/java/com/alibaba/nacos/console/controller/v3/core/ConsolePluginController.java:133

        pluginProxy.updatePluginStatus(pluginType, pluginName, enabled, localOnly);
        return Result.success("Plugin status updated successfully");
    }
    
    /**
     * Update plugin configuration.
     *
     * @param form plugin config form
     * @return success result
     */
    @Since("3.2.0")
    @PutMapping("/config")
    @Secured(resource = Constants.Resource.CONSOLE_RESOURCE_NAME_PREFIX
        + "plugins", action = ActionTypes.WRITE, signType = SignType.CONSOLE,
        apiType = ApiType.CONSOLE_API)
    public Result<String> updatePluginConfig(PluginConfigForm form) throws NacosException {
        if (StringUtils.isBlank(form.getPluginType())
            || StringUtils.isBlank(form.getPluginName())) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "Plugin type and name are required");
        }
        if (form.getConfig() == null) {
            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(),
                ErrorCode.PARAMETER_VALIDATE_ERROR,
                "Plugin configuration is required");
        }
        pluginProxy.updatePluginConfig(form.getPluginType(), form.getPluginName(), form.getConfig(),
            form.isLocalOnly());
        return Result.success("Plugin configuration updated successfully");
    }
    
    /**
     * Get plugin availability across cluster nodes.
     *
     * @param pluginType plugin type
     * @param pluginName plugin name

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Populate both pluginType and pluginName on the PluginConfigForm before submitting the PUT.
  2. Add client-side validation to require both fields before enabling the submit action.
  3. Confirm the form field names match the PluginConfigForm properties exactly.

Example fix

// before
form.setPluginType("auth");
// pluginName left blank
proxy.updatePluginConfig(form);

// after
form.setPluginType("auth");
form.setPluginName("myAuthPlugin");
form.setConfig(Map.of("key", "value"));
proxy.updatePluginConfig(form);
Defensive patterns

Strategy: validation

Validate before calling

// Validate plugin identity before submitting the update
if (form.getPluginType() == null || form.getPluginType().isBlank()
    || form.getPluginName() == null || form.getPluginName().isBlank()) {
    throw new IllegalArgumentException("pluginType and pluginName are required");
}
pluginProxy.updatePluginConfig(form);

Type guard

// Java: boolean guard for required plugin identity
boolean hasPluginIdentity = !StringUtils.isAnyBlank(form.getPluginType(), form.getPluginName());

Try / catch

try {
    controller.updatePluginConfig(form);
} catch (NacosApiException e) {
    if (e.getDetailErrCode() == ErrorCode.PARAMETER_VALIDATE_ERROR.getCode()) {
        // fix pluginType/pluginName and retry
    } else { throw e; }
}

Prevention

When it happens

Trigger: PUTing a plugin-config update where pluginType or pluginName in the form is null, empty, or whitespace only.

Common situations: Frontend form submitting before a plugin is selected; misrouted request missing path/form parameters; a migration script that omits the plugin identity fields.

Related errors


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/4a0e25b3e69f1cf6. Report an issue: GitHub.