{"record":{"id":"f88e7b8179e4ffd0","repo":"hasura/graphql-engine","slug":"reqwest-error-0-f88e7b","errorCode":null,"errorMessage":"Reqwest error: {0}","messagePattern":"Reqwest error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/plugins/pre-parse-plugin/src/execute.rs","lineNumber":29,"sourceCode":"use lang_graphql::{ast::common as ast, http::RawRequest};\nuse open_dds::plugins::LifecyclePreParsePluginHook;\nuse tracing_util::{\n    ErrorVisibility, SpanVisibility, Traceable, TraceableError, set_attribute_on_active_span,\n};\n\n/// HTTP status code used by pre-parse plugins to indicate they want to continue\n/// processing with a modified request body.\n///\n/// We use 299 (an unassigned 2xx status code) as a special signal for this.\nconst CONTINUE_WITH_REQUEST_STATUS: u16 = 299;\n\n#[derive(Debug, thiserror::Error)]\npub enum Error {\n    #[error(\"Error while making the HTTP request to the pre-parse plugin {0} - {1}\")]\n    ErrorWhileMakingHTTPRequestToTheHook(String, reqwest::Error),\n    #[error(\"Error while building the request for the pre-parse plugin {0} - {1}\")]\n    BuildRequestError(String, String),\n    #[error(\"Reqwest error: {0}\")]\n    ReqwestError(reqwest::Error),\n    #[error(\"Unexpected status code: {0}\")]\n    UnexpectedStatusCode(u16),\n    #[error(\"Error parsing the request: {0}\")]\n    PluginRequestParseError(serde_json::error::Error),\n}\n\nimpl Error {\n    pub fn is_internal(&self) -> bool {\n        match self {\n            Error::ErrorWhileMakingHTTPRequestToTheHook(_, _) | Error::UnexpectedStatusCode(_) => {\n                false\n            }\n            Error::BuildRequestError(_, _)\n            | Error::ReqwestError(_)\n            | Error::PluginRequestParseError(_) => true,\n        }\n    }","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plugins/pre-parse-plugin/src/execute.rs#L11-L47","documentation":"A generic wrapper around a reqwest::Error produced by the pre-parse plugin executor when the error does not fit the more specific variants (e.g. response body read failures or redirects). The underlying reqwest error is included verbatim.","triggerScenarios":"Any reqwest operation in the pre-parse hook execution path failing outside of explicit request-build or send scenarios, such as reading a chunked response body that dies mid-stream.","commonSituations":"Plugin closes the connection mid-response; proxy interrupts the stream; TLS handshake issues surfacing at an unexpected stage.","solutions":["Inspect the wrapped reqwest error text for the root cause category (timeout, body read, TLS).","Check plugin service logs for crashes or aborted responses around the same time.","Stabilize the network path between engine and plugin (proxy, keep-alive, timeouts).","Retry transient failures via the engine's retry policy if configured."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match res {\n    Err(Error::ReqwestError(e)) if e.is_timeout() || e.is_connect() => retry().await,\n    other => other,\n}","preventionTips":["Set explicit connect/read timeouts on the reqwest client.","Enable keep-alive and connection pooling to the hook.","Monitor reqwest error categories in metrics."],"tags":["network","http","plugin","rust"],"backgroundTag":"http-request-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}