{"record":{"id":"11d74c3576d6c115","repo":"hasura/graphql-engine","slug":"reqwest-error-0-11d74c","errorCode":null,"errorMessage":"Reqwest error: {0}","messagePattern":"Reqwest error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/plugins/pre-route-plugin/src/execute.rs","lineNumber":26,"sourceCode":"use regex::Regex;\nuse serde::Serialize;\n\nuse open_dds::plugins::{\n    LifecyclePreRoutePluginHook, LifecyclePreRoutePluginHookConfigRequestMethod,\n    LifecyclePreRoutePluginHookIncomingHTTPMethod,\n};\nuse serde_json::json;\nuse tracing_util::{\n    ErrorVisibility, SpanVisibility, Traceable, TraceableError, set_attribute_on_active_span,\n};\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    #[error(\"HTTP method {0} not supported\")]\n    UnsupportedHTTPMethod(String),\n    #[error(\"Invalid header name {0}\")]\n    InvalidHeaderName(String),\n    #[error(\"Invalid header value {0}\")]\n    InvalidHeaderValue(String),\n    #[error(\"Not found\")]\n    NotFound,\n    // Only used in the pre-route plugin handler function. Defined to ensure consistent\n    // response formatting in IntoResponse impl.\n    #[error(\"Cannot load pre-route plugins: {0}\")]\n    CannotLoadPlugins(String),\n}","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plugins/pre-route-plugin/src/execute.rs#L8-L44","documentation":"Generic reqwest::Error wrapper in the pre-route plugin executor for transport-level failures not covered by the explicit build/send variants (e.g. body read or decode errors during the hook call).","triggerScenarios":"The hook response stream fails mid-read, or another reqwest operation in the pre-route execution path errors.","commonSituations":"Hook crashes mid-response; LB cutting connections; decompression errors on gzip-encoded hook responses.","solutions":["Inspect the wrapped reqwest error for the failure category.","Correlate with hook service logs for crashes/timeouts.","Disable problematic content-encodings on the hook or fix its gzip handling."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"Err(Error::ReqwestError(ref e)) if e.is_timeout() || e.is_decode() => retry_with_jitter().await","preventionTips":["Set explicit timeouts; handle gzip correctly on the hook.","Watch for LB connection cuts between engine and hook.","Add circuit-breaking around the hook call."],"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"}