{"record":{"id":"13c22e86f0e77036","repo":"apache/seatunnel","slug":"request-failed-13c22e","errorCode":"REQUEST_FAILED","errorMessage":"http client execute exception, http response status code:[%s], content:[%s]","messagePattern":"http client execute exception, http response status code:\\[(.+?)\\], content:\\[(.+?)\\]","errorType":"error_code","errorClass":"HttpConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/source/HttpSourceReader.java","lineNumber":190,"sourceCode":"                    String lineStr;\n                    while ((lineStr = bufferedReader.readLine()) != null) {\n                        collect(output, lineStr);\n                    }\n                } else {\n                    collect(output, content);\n                }\n            }\n            log.debug(\n                    \"http client execute success request param:[{}], http response status code:[{}], content:[{}]\",\n                    httpParameter.getParams(),\n                    response.getCode(),\n                    response.getContent());\n        } else {\n            String msg =\n                    String.format(\n                            \"http client execute exception, http response status code:[%s], content:[%s]\",\n                            response.getCode(), response.getContent());\n            throw new HttpConnectorException(HttpConnectorErrorCode.REQUEST_FAILED, msg);\n        }\n    }\n\n    private void pollAndCollectBinaryData(Collector<SeaTunnelRow> output) throws Exception {\n        int statusCode =\n                httpClient.executeBinaryStreaming(\n                        this.httpParameter.getUrl(),\n                        this.httpParameter.getMethod().getMethod(),\n                        this.httpParameter.getHeaders(),\n                        this.httpParameter.getParams(),\n                        this.httpParameter.getBody(),\n                        this.httpParameter.isKeepParamsAsForm(),\n                        binaryChunkSize,\n                        httpParameter.getUrl(),\n                        row -> output.collect(new SeaTunnelRow(row)));\n        if (statusCode >= 200 && statusCode <= 207) {\n            noMoreElementFlag = true;\n        } else {","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/source/HttpSourceReader.java#L172-L208","documentation":"In HttpSourceReader.pollAndCollectData, when the HTTP client returns a response whose status code is not in the accepted success range, the reader throws REQUEST_FAILED with the status code and response body. This is the standard text-mode failure path for HTTP requests during polling.","triggerScenarios":"pollAndCollectData executes an HTTP request whose response code is outside 200-207 (e.g. 404, 500, 401, 429).","commonSituations":"Wrong URL or path returning 404; expired/missing auth headers returning 401/403; server-side 5xx errors; rate limiting (429); proxy/gateway failures returning 502/503.","solutions":["Check the status code and content in the error message to identify whether it is auth (401/403), routing (404), rate limit (429), or server error (5xx)","Fix the URL, credentials, and headers in the HTTP source config","Add retry configuration or verify server availability if 5xx","Verify network/proxy connectivity from the SeaTunnel worker nodes"],"exampleFix":"// before\nurl = \"http://api.example.com/v2/data\"  # 404 after API version bump\n// after\nurl = \"http://api.example.com/v3/data\"","handlingStrategy":"try-catch","validationCode":"// probe endpoint before job: curl -s -o /dev/null -w '%{http_code}' $URL -H 'Authorization: ...'","typeGuard":null,"tryCatchPattern":"try { reader.pollAndCollectData(collector); } catch (HttpConnectorException e) { if (e.getErrorCode() == HttpConnectorErrorCode.REQUEST_FAILED) { log.error(\"HTTP request failed; check status code in message\", e); throw e; } throw e; }","preventionTips":["Validate URL and auth headers with curl before submitting the job","Add connector retry config for transient 5xx/429","Monitor API deprecation/version changes for the endpoint"],"tags":["http","status-code","network"],"backgroundTag":"http-error-response","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}