alibaba/nacos · error · NacosApiException
PARAMETER_MISSING
PARAMETER_MISSING
Error message
Required parameter 'entry' type String is not present
What it means
Thrown by UpdateSwitchForm.validate() when the 'entry' field is blank in a server-switch update request. Nacos exposes runtime switches (e.g. defaultPushEmptyService, distroThreshold) addressable by a key; 'entry' names the switch to modify, so a blank entry yields HTTP 400 PARAMETER_MISSING.
Source
Thrown at naming/src/main/java/com/alibaba/nacos/naming/model/form/UpdateSwitchForm.java:52
private static final long serialVersionUID = -1580959130954136990L;
private boolean debug;
private String entry;
private String value;
public UpdateSwitchForm() {
}
/**
* check param.
*
* @throws NacosApiException NacosApiException
*/
public void validate() throws NacosApiException {
if (StringUtils.isBlank(entry)) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"Required parameter 'entry' type String is not present");
}
if (StringUtils.isBlank(value)) {
throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,
"Required parameter 'value' type String is not present");
}
}
public boolean getDebug() {
return debug;
}
public void setDebug(boolean debug) {
this.debug = debug;
}
public String getEntry() {
return entry;View on GitHub (pinned to 9b989acdf1)
Solutions
- Provide a valid, non-blank 'entry' key (e.g. 'checkers', 'defaultPushEmptyService').
- First query GET /operator/switches to enumerate available entry names and their current values.
- Pre-validate StringUtils.isNotBlank(form.getEntry()).
Example fix
// before curl -X PUT '.../operator/switches' -d 'value=true' // after curl -X PUT '.../operator/switches' -d 'entry=defaultPushEmptyService&value=true'
Defensive patterns
Strategy: validation
Validate before calling
if (StringUtils.isBlank(entry)) {
throw new IllegalArgumentException("entry (switch key) is required");
}
form.setEntry(entry);
form.setValue(value); Type guard
static boolean hasValidSwitchEntry(String e) {
return e != null && !e.trim().isEmpty();
} Prevention
- List available switches via GET /operator/switches before updating.
- Keep an enum/set of known entry names in your client config.
- Pre-validate entry+value together.
When it happens
Trigger: PUT/POST to the switch update endpoint (e.g. /v3/admin/ns/operator/switches or legacy /nacos/v1/ns/operator/switches) with no 'entry'.
Common situations: Calling the switch API without knowing the available entry names; UI free-text field left empty; malformed automation that passes only 'value'.
Related errors
- PARAMETER_MISSING
- PARAMETER_MISSING
- PARAMETER_MISSING
- 10000
- distroThreshold can not be zero or negative: {threshold}
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/450aa5a92c9f89f6.
Report an issue: GitHub.