{"record":{"id":"c5e7067ee0ca4666","repo":"alibaba/canal","slug":"return-error-reasonphrase-result","errorCode":null,"errorMessage":"return error !{reasonPhrase}, {result}","messagePattern":"return error !(.+?), (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/rds/request/AbstractRequest.java","lineNumber":221,"sourceCode":"            .register(\"https\", sslsf)\n            .build();\n        HttpClientConnectionManager httpClientConnectionManager = new PoolingHttpClientConnectionManager(registry);\n        CloseableHttpClient httpClient = HttpClientBuilder.create()\n            .setMaxConnPerRoute(50)\n            .setMaxConnTotal(100)\n            .setConnectionManager(httpClientConnectionManager)\n            .build();\n        RequestConfig requestConfig = RequestConfig.custom()\n            .setConnectTimeout(timeout)\n            .setConnectionRequestTimeout(timeout)\n            .setSocketTimeout(timeout)\n            .build();\n        getMethod.setConfig(requestConfig);\n        HttpResponse response = httpClient.execute(getMethod);\n        int statusCode = response.getStatusLine().getStatusCode();\n        if (statusCode != HttpResponseStatus.OK.code() && statusCode != HttpResponseStatus.PARTIAL_CONTENT.code()) {\n            String result = EntityUtils.toString(response.getEntity());\n            throw new RuntimeException(\"return error !\" + response.getStatusLine().getReasonPhrase() + \", \" + result);\n        }\n        return response;\n    }\n\n    protected abstract T processResult(HttpResponse response) throws Exception;\n\n    protected void processBefore() {\n\n    }\n\n    public final T doAction() throws Exception {\n        processBefore();\n        String requestStr = makeRequestString(treeMap);\n        HttpGet httpGet = new HttpGet(protocol + \"://\" + endPoint + \"?\" + requestStr);\n        HttpResponse response = executeHttpRequest(httpGet, endPoint);\n        if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {\n            String result = EntityUtils.toString(response.getEntity());\n            throw new RuntimeException(\"http request failed! \" + result);","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/alibaba/canal/blob/87be50e87686a3e8af08c368d0e1ffd1f59eb04a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/rds/request/AbstractRequest.java#L203-L239","documentation":"Thrown by AbstractRequest.executeHttpRequest() when the RDS OpenAPI HTTP response status is neither 200 OK nor 206 Partial Content. The message includes the HTTP reason phrase (e.g. 'Bad Request', 'Forbidden') and the full response body. This is the low-level check before response processing.","triggerScenarios":"Any RDS OpenAPI call via AbstractRequest.doAction() that returns an unexpected HTTP status. The response body typically contains a structured error JSON with fields like Code, Message, RequestId. Common for signature mismatches, invalid parameters, or throttling.","commonSituations":"SignatureDoesNotMatch due to incorrect AccessKeySecret or clock skew; InvalidAccessKeyId.NotFound for deleted/deactivated keys; MissingParameter for required API fields; Throttling when API call rate exceeds limits; InternalError from RDS service.","solutions":["Parse the response body for the RDS error Code and Message fields to get the specific failure reason.","If SignatureDoesNotMatch: verify AccessKeySecret is correct and the server clock is synchronized (NTP).","If InvalidAccessKeyId: verify the AccessKeyId is active in the Alibaba Cloud console.","If Throttling: reduce the frequency of API calls or request quota increase.","If MissingParameter: ensure all required query parameters are set via putQueryString()."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    T result = request.doAction();\n} catch (RuntimeException e) {\n    String msg = e.getMessage();\n    if (msg.contains(\"SignatureDoesNotMatch\")) {\n        // fix AccessKeySecret or sync clock\n    } else if (msg.contains(\"InvalidAccessKeyId\")) {\n        // fix AccessKeyId\n    } else if (msg.contains(\"Throttling\")) {\n        // back off and retry\n    }\n}","preventionTips":["Verify AccessKeyId and AccessKeySecret are correct and active.","Ensure the server clock is NTP-synced to prevent signature timestamp errors.","Set all required API parameters via putQueryString() before calling doAction().","Monitor API call rate to avoid throttling."],"tags":["rds","openapi","http","signature","api-error"],"backgroundTag":null,"analyzedSha":"87be50e87686a3e8af08c368d0e1ffd1f59eb04a","analyzedAt":"2026-08-14T04:30:11.918Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}