{"record":{"id":"a4f6f0c8305c51f7","repo":"apache/incubator-seata","slug":"mcp-delete-request-returned-non-success-status-s","errorCode":null,"errorMessage":"MCP DELETE request returned non-success status: %s, response: %s","messagePattern":"MCP DELETE request returned non-success status: (.+?), response: (.+?)","errorType":"exception","errorClass":"ServiceCallException","httpStatus":null,"severity":"error","filePath":"console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java","lineNumber":201,"sourceCode":"        } else {\n            setNamespaceHeaderAndQueryParam(nameSpaceDetail, headers, queryParams);\n        }\n        headers.add(WebSecurityConfig.AUTHORIZATION_HEADER, getToken());\n        Map<String, Object> queryParamsMap = objectToQueryParamMap(objectQueryParams, objectMapper);\n        String url = buildUrl(namingServerProperties.getNamingServerUrl(), path, queryParams, queryParamsMap);\n        HttpEntity<String> entity = new HttpEntity<>(headers);\n        String responseBody;\n        try {\n            ResponseEntity<String> response = executeRequest(url, HttpMethod.DELETE, entity);\n\n            responseBody = response.getBody();\n\n            if (!response.getStatusCode().is2xxSuccessful()) {\n                String errorMsg = String.format(\n                        \"MCP DELETE request returned non-success 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 DELETE Call TC Failed.\";\n            LOGGER.error(errorMsg, e);\n            throw new ServiceCallException(errorMsg);\n        }\n    }\n\n    @Override\n    public String putCallTC(\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":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java#L183-L219","documentation":"deleteCallTC throws ServiceCallException when the HTTP DELETE forwarded to a TC instance returns a non-2xx status. The message embeds the TC's status code and body. This path serves destructive console operations (e.g. forcing global transaction rollback/removal), so failures here block the admin action.","triggerScenarios":"MCP/console delete operations against a TC that responds with an error: 404 when the target global transaction/session no longer exists (already rolled back or timed out), 401/403 auth rejection, or 500 on TC-side failure.","commonSituations":"Attempting to force-delete a global transaction that committed/rolled back between the list view and the delete click; double-submitting a delete; permission mismatches between console user and TC.","solutions":["Check the embedded status/body — a 404 usually means the transaction is already gone, so refresh and confirm it still exists before retrying","Guard against double-submission in the UI/tool client","For 401/403 verify the JWT validates on the TC (shared secret) and the user may delete in that namespace","For 500, inspect TC logs for the failing xid and address the server-side cause before retrying"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { service.deleteCallTC(...); } catch (ServiceCallException e) { if (status == 404) treat as already-deleted (idempotent success); else surface embedded body; }","preventionTips":["Refresh and confirm the transaction still exists right before delete","Make delete flows idempotent on xid to tolerate 404","Check user permissions on the TC for the target namespace"],"tags":["seata","console","tc","http","delete"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}