{"record":{"id":"1aeb62b2cabd07d4","repo":"alibaba/nacos","slug":"23000","errorCode":"23000","errorMessage":"Illegal state: {state}","messagePattern":"Illegal state: (.+?)","errorType":"http","errorClass":"NacosApiException","httpStatus":400,"severity":"warning","filePath":"core/src/main/java/com/alibaba/nacos/core/controller/v3/NacosClusterControllerV3.java","lineNumber":95,"sourceCode":"     *\n     * @param address match address\n     * @param state   match state\n     * @return members that matches condition\n     */\n    @Since(\"3.0.0\")\n    @GetMapping(value = \"/node/list\")\n    @Secured(action = ActionTypes.READ, resource = NACOS_ADMIN_CORE_CONTEXT_V3\n        + \"/cluster\", signType = SignType.CONSOLE, apiType = ApiType.ADMIN_API)\n    public Result<Collection<Member>> listNodes(\n        @RequestParam(value = \"address\", required = false) String address,\n        @RequestParam(value = \"state\", required = false) String state) throws NacosException {\n        \n        NodeState nodeState = null;\n        if (StringUtils.isNoneBlank(state)) {\n            try {\n                nodeState = NodeState.valueOf(state.toUpperCase(Locale.ROOT));\n            } catch (IllegalArgumentException e) {\n                throw new NacosApiException(HttpStatus.BAD_REQUEST.value(), ErrorCode.ILLEGAL_STATE,\n                    \"Illegal state: \" + state);\n            }\n        }\n        return Result.success(nacosClusterOperationService.listNodes(address, nodeState));\n    }\n    \n    /**\n     * Other nodes return their own metadata information.\n     *\n     * @param nodes List of {@link Member}\n     * @return {@link RestResult}\n     */\n    @Since(\"3.0.0\")\n    @PutMapping(value = \"/node/list\")\n    @Secured(action = ActionTypes.WRITE, resource = NACOS_ADMIN_CORE_CONTEXT_V3\n        + \"/cluster\", signType = SignType.CONSOLE, apiType = ApiType.ADMIN_API)\n    public Result<Boolean> updateNodes(@RequestBody List<Member> nodes) throws NacosApiException {\n        if (nodes == null || nodes.isEmpty()) {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/core/src/main/java/com/alibaba/nacos/core/controller/v3/NacosClusterControllerV3.java#L77-L113","documentation":"Thrown by GET /v3/admin/core/cluster/node/list when the optional 'state' query parameter cannot be parsed into a NodeState enum constant (after upper-casing). Valid NodeState values are STARTING, UP, SUSPICIOUS, DOWN, ISOLATION (case-insensitive). Maps to NacosApiException with ErrorCode.ILLEGAL_STATE (code 23000) and HTTP 400.","triggerScenarios":"Passing state=online, state=ready, state=alive, or any string that is not one of the five NodeState names. NodeState.valueOf throws IllegalArgumentException which is caught and rethrown as this NacosApiException.","commonSituations":"Operator/console uses an intuitive but unsupported state name; documentation mismatch; scripting the cluster node-list API with a guessed state value.","solutions":["Use one of the supported state values (case-insensitive): starting, up, suspicious, down, isolation.","Omit the state parameter entirely to list nodes in any state.","Update the calling tool/console to the documented enum values."],"exampleFix":"// before\nGET /v3/admin/core/cluster/node/list?state=online\n\n// after\nGET /v3/admin/core/cluster/node/list?state=up","handlingStrategy":"validation","validationCode":"Set<String> VALID = Arrays.stream(NodeState.values())\n    .map(Enum::name).map(String::toLowerCase).collect(Collectors.toSet());\nif (state != null && !VALID.contains(state.toLowerCase(Locale.ROOT))) {\n    // reject before calling the API\n}","typeGuard":null,"tryCatchPattern":"try {\n    restTemplate.getForObject(\"/node/list?state=\" + state, ...);\n} catch (NacosApiException e) {\n    if (e.getErrCode() == ErrorCode.ILLEGAL_STATE.getCode()) { /* bad state value */ }\n}","preventionTips":["Validate the state against NodeState names (case-insensitive) client-side.","Omit state when you want nodes in any state."],"tags":["cluster","validation","node-state","api","bad-request"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}