{"record":{"id":"cc567b8dd1fc0297","repo":"apache/incubator-seata","slug":"mcp-get-request-failed-with-status-s-response","errorCode":null,"errorMessage":"MCP GET request failed with status: %s, response: %s","messagePattern":"MCP GET request failed with status: (.+?), response: (.+?)","errorType":"exception","errorClass":"ServiceCallException","httpStatus":null,"severity":"error","filePath":"console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java","lineNumber":121,"sourceCode":"\n    @Override\n    public String getCallNameSpace(String path) {\n        HttpHeaders headers = new HttpHeaders();\n        headers.add(WebSecurityConfig.AUTHORIZATION_HEADER, getToken());\n        String url = buildUrl(namingServerProperties.getNamingServerUrl(), path, null, null);\n        HttpEntity<String> entity = new HttpEntity<>(headers);\n        String responseBody;\n        try {\n            ResponseEntity<String> response = executeRequest(url, HttpMethod.GET, entity);\n\n            responseBody = response.getBody();\n\n            if (!response.getStatusCode().is2xxSuccessful()) {\n                String errorMsg = String.format(\n                        \"MCP GET request failed with status: %s, response: %s\",\n                        response.getStatusCode(), response.getBody());\n                LOGGER.warn(errorMsg);\n                throw new ServiceCallException(errorMsg, response.getStatusCode());\n            }\n            return responseBody;\n        } catch (RestClientException e) {\n            String errorMsg = \"MCP GET Call NameSpace Failed.\";\n            LOGGER.error(errorMsg, e);\n            throw new ServiceCallException(errorMsg);\n        }\n    }\n\n    @Override\n    public String getCallTC(\n            NameSpaceDetail nameSpaceDetail,\n            String path,\n            Object objectQueryParams,\n            Map<String, String> queryParams,\n            HttpHeaders headers) {\n        if (headers == null) {\n            headers = new HttpHeaders();","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java#L103-L139","documentation":"getCallNameSpace throws ServiceCallException when the HTTP GET to the naming server returns a non-2xx status. The message embeds the upstream status code and body, letting you see the naming server's actual error (404 unknown namespace, 500 internal error, etc.) from the console's perspective.","triggerScenarios":"Calling getCallNameSpace when the naming server endpoint rejects the request: unknown namespace header, 404 on the queried path, 401/403 from RBAC on the naming server, or 500 from a naming-server bug — i.e. connectivity is fine but the response status is not 2xx.","commonSituations":"Querying namespaces or vgroups that do not exist on the naming server; version mismatch between console and naming-server REST APIs (changed paths); missing permissions for the authenticated user on the target namespace.","solutions":["Read the embedded status and body in the exception message — it is the naming server's real response and usually names the root cause","Verify the namespace value sent in the x-seata-namespace header exists on the naming server","Confirm console and naming-server versions match so REST paths agree","For 401/403, check the forwarded JWT has access to the target namespace"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { body = service.getCallNameSpace(...); } catch (ServiceCallException e) { map status from exception to 404/403/502 response with the embedded upstream body; }","preventionTips":["Verify namespace names before querying","Keep console and naming-server versions aligned","Log the full embedded status+body for triage"],"tags":["seata","console","naming-server","http"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}