{"record":{"id":"1d134a8c5c2dd954","repo":"alibaba/nacos","slug":"server-not-implemented","errorCode":"SERVER_NOT_IMPLEMENTED","errorMessage":"Request Nacos server does not support %s feature.","messagePattern":"Request Nacos server does not support (.+?) feature\\.","errorType":"exception","errorClass":"NacosRuntimeException","httpStatus":null,"severity":"error","filePath":"client/src/main/java/com/alibaba/nacos/client/ai/remote/AiGrpcClient.java","lineNumber":776,"sourceCode":"     */\n    public boolean isAbilitySupportedByServer(AbilityKey abilityKey) {\n        return rpcClient.getConnectionAbility(abilityKey) == AbilityStatus.SUPPORTED;\n    }\n    \n    private void checkServerAbilityOrThrow(AbilityKey abilityKey, String featureName) {\n        if (!rpcClient.isRunning()) {\n            throw new NacosRuntimeException(NacosException.SERVER_ERROR,\n                String.format(\n                    \"Request Nacos server failed: connection is unavailable, unable to determine %s \"\n                        + \"ability.\",\n                    featureName));\n        }\n        AbilityStatus abilityStatus = rpcClient.getConnectionAbility(abilityKey);\n        if (AbilityStatus.SUPPORTED == abilityStatus) {\n            return;\n        }\n        if (AbilityStatus.NOT_SUPPORTED == abilityStatus) {\n            throw new NacosRuntimeException(NacosException.SERVER_NOT_IMPLEMENTED,\n                String.format(\"Request Nacos server does not support %s feature.\",\n                    featureName));\n        }\n    }\n    \n    private void checkServerAbilityStrict(AbilityKey abilityKey, String featureName)\n        throws NacosException {\n        if (!rpcClient.isRunning()) {\n            throw new NacosException(NacosException.SERVER_ERROR,\n                \"Request Nacos server failed: connection is unavailable, unable to determine \"\n                    + featureName + \" ability.\");\n        }\n        AbilityStatus abilityStatus = rpcClient.getConnectionAbility(abilityKey);\n        if (AbilityStatus.SUPPORTED != abilityStatus) {\n            throw new NacosException(NacosException.SERVER_NOT_IMPLEMENTED,\n                \"Request Nacos server does not support \" + featureName + \" feature.\");\n        }\n    }","sourceCodeStart":758,"sourceCodeEnd":794,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/client/src/main/java/com/alibaba/nacos/client/ai/remote/AiGrpcClient.java#L758-L794","documentation":"Thrown by AiGrpcClient.checkServerAbilityOrThrow when the negotiated AbilityStatus for the required ability key is NOT_SUPPORTED. The gRPC connection is alive, but the connected Nacos server does not implement the requested AI feature (e.g. agent registry), so the operation is refused with SERVER_NOT_IMPLEMENTED (501-class). This protects the client from sending an unsupported request.","triggerScenarios":"Calling an AI registry operation against a Nacos server that predates the feature (older server version), or a server build with the AI module disabled, after the ability table reports NOT_SUPPORTED for SERVER_AGENT_REGISTRY.","commonSituations":"Client SDK version newer than the deployed server; server running an edition without AI registry support; feature flag disabled server-side; mixing a v3.2+ AI client against an older Nacos server.","solutions":["Upgrade the Nacos server to a version that supports the AI registry feature.","Verify aiClient.isAbilitySupportedByServer(AbilityKey.SERVER_AGENT_REGISTRY) before calling AI APIs.","Fall back to a transport/API the server does support, or disable the AI feature in the client."],"exampleFix":"// before\naiGrpcClient.subscribeAgentCard(agentName, version);\n// after\nif (!aiGrpcClient.isAbilitySupportedByServer(AbilityKey.SERVER_AGENT_REGISTRY)) {\n    throw new IllegalStateException(\"Connected Nacos server lacks AI agent registry support; upgrade server\");\n}\naiGrpcClient.subscribeAgentCard(agentName, version);","handlingStrategy":"validation","validationCode":"if (!aiGrpcClient.isAbilitySupportedByServer(AbilityKey.SERVER_AGENT_REGISTRY)) {\n    throw new IllegalStateException(\"Connected server does not support AI agent registry\");\n}\naiGrpcClient.subscribeAgentCard(agentName, version);","typeGuard":"aiGrpcClient.isAbilitySupportedByServer(AbilityKey.SERVER_AGENT_REGISTRY)","tryCatchPattern":"try {\n    aiGrpcClient.subscribeAgentCard(agentName, version);\n} catch (NacosRuntimeException e) {\n    if (e.getErrCode() == NacosException.SERVER_NOT_IMPLEMENTED) {\n        // server too old / feature disabled - upgrade or disable client feature\n    }\n    throw e;\n}","preventionTips":["Keep client and server versions compatible.","Gate AI features on the negotiated ability.","Provide a graceful degradation path when the server lacks the feature."],"tags":["ai","grpc","ability-negotiation","version-mismatch","not-implemented"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}