{"record":{"id":"450aa5a92c9f89f6","repo":"alibaba/nacos","slug":"parameter-missing-450aa5","errorCode":"PARAMETER_MISSING","errorMessage":"Required parameter 'entry' type String is not present","messagePattern":"Required parameter 'entry' type String is not present","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"error","filePath":"naming/src/main/java/com/alibaba/nacos/naming/model/form/UpdateSwitchForm.java","lineNumber":52,"sourceCode":"    private static final long serialVersionUID = -1580959130954136990L;\n    \n    private boolean debug;\n    \n    private String entry;\n    \n    private String value;\n    \n    public UpdateSwitchForm() {\n    }\n    \n    /**\n     * check param.\n     *\n     * @throws NacosApiException NacosApiException\n     */\n    public void validate() throws NacosApiException {\n        if (StringUtils.isBlank(entry)) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,\n                \"Required parameter 'entry' type String is not present\");\n        }\n        if (StringUtils.isBlank(value)) {\n            throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.PARAMETER_MISSING,\n                \"Required parameter 'value' type String is not present\");\n        }\n    }\n    \n    public boolean getDebug() {\n        return debug;\n    }\n    \n    public void setDebug(boolean debug) {\n        this.debug = debug;\n    }\n    \n    public String getEntry() {\n        return entry;","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/naming/src/main/java/com/alibaba/nacos/naming/model/form/UpdateSwitchForm.java#L34-L70","documentation":"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.","triggerScenarios":"PUT/POST to the switch update endpoint (e.g. /v3/admin/ns/operator/switches or legacy /nacos/v1/ns/operator/switches) with no 'entry'.","commonSituations":"Calling the switch API without knowing the available entry names; UI free-text field left empty; malformed automation that passes only 'value'.","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())."],"exampleFix":"// before\ncurl -X PUT '.../operator/switches' -d 'value=true'\n// after\ncurl -X PUT '.../operator/switches' -d 'entry=defaultPushEmptyService&value=true'","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(entry)) {\n    throw new IllegalArgumentException(\"entry (switch key) is required\");\n}\nform.setEntry(entry);\nform.setValue(value);","typeGuard":"static boolean hasValidSwitchEntry(String e) {\n    return e != null && !e.trim().isEmpty();\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["naming","rest-api","validation","parameter-missing","operator","switch"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}