{"record":{"id":"a5f61198766ba8da","repo":"apache/seatunnel","slug":"request-failed-a5f611","errorCode":"REQUEST_FAILED","errorMessage":"http client execute exception, http response status code:[${code}], content:[${content}]","messagePattern":"http client execute exception, http response status code:\\[(.+?)\\], content:\\[(.+?)\\]","errorType":"error_code","errorClass":"HttpConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-graphql/src/main/java/org/apache/seatunnel/connectors/seatunnel/graphql/source/reader/GraphQLSourceHttpReader.java","lineNumber":138,"sourceCode":"                    String lineStr;\n                    while ((lineStr = bufferedReader.readLine()) != null) {\n                        GraphQLUtil.collect(deserializationCollector, lineStr, contentJson, output);\n                    }\n                } else {\n                    GraphQLUtil.collect(deserializationCollector, content, contentJson, output);\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","sourceCodeStart":120,"sourceCodeEnd":142,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-graphql/src/main/java/org/apache/seatunnel/connectors/seatunnel/graphql/source/reader/GraphQLSourceHttpReader.java#L120-L142","documentation":"GraphQLSourceHttpReader.pollAndCollectData executes the GraphQL HTTP request via an HTTP client; when the response status code is not successful it throws HttpConnectorException(REQUEST_FAILED) including the status code and response body. It means the server answered but rejected or failed the request.","triggerScenarios":"HTTP client returns a non-2xx code (400 bad query, 401/403 auth, 404 wrong endpoint, 429 rate limit, 5xx server error) during internalPollNext's polling loop.","commonSituations":"Malformed GraphQL query/variables; expired or missing auth header; wrong URL path; GraphQL server returning 500 on resolver errors; gateway returning 502/504.","solutions":["Read the status code and content in the message to identify the failure","400: validate the query and variables against the schema (GraphiQL/Introspection)","401/403: fix the auth header/token configuration","429: reduce parallelism or add rate limiting/backoff","5xx/502/504: retry later or check the GraphQL server's own logs"],"exampleFix":"// before: query variable type mismatch\nquery($id: Int!) { user(id: $id) { name } }  // server sends string\n// after\nquery($id: String!) { user(id: $id) { name } }","handlingStrategy":"try-catch","validationCode":"// validate query against schema before running the job\ncurl -X POST $URL -H 'Authorization: ...' -d '{\"query\":\"...\",\"variables\":{}}'","typeGuard":null,"tryCatchPattern":"try { pollAndCollectData(); } catch (HttpConnectorException e) { switch (e.getStatusCode() / parse from msg) { case 429: backoff; case 401: refresh token; default: fail task; } }","preventionTips":["Validate the query in GraphiQL before configuring","Use long-lived tokens or auto-refreshing auth","Add retry/backoff for 429/5xx","Match variable types exactly to the schema"],"tags":["graphql","http","api-error"],"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"}