{"record":{"id":"ca39b0ea5bf1a83b","repo":"hasura/graphql-engine","slug":"reqwest-error-0-ca39b0","errorCode":null,"errorMessage":"Reqwest error: {0}","messagePattern":"Reqwest error: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/plugins/pre-response-plugin/src/execute/common.rs","lineNumber":21,"sourceCode":"use axum::{\n    http::{HeaderMap, HeaderName, StatusCode},\n    response::IntoResponse,\n};\n\nuse hasura_authn_core::Session;\nuse lang_graphql::{ast::common as ast, http::RawRequest};\nuse open_dds::plugins::{LifecyclePluginUrl, LifecyclePreResponsePluginHookConfigRequest};\nuse reqwest::header::HeaderValue;\nuse serde::Serialize;\nuse tracing_util::{ErrorVisibility, TraceableError};\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(\"Error parsing the request: {0}\")]\n    PluginRequestParseError(serde_json::Error),\n    #[error(\"Error parsing the engine response: {0}\")]\n    EngineResponseParseError(serde_json::Error),\n    #[error(\"Unexpected status code: {0}\")]\n    UnexpectedStatusCode(u16),\n    #[error(\"Error serializing the modified response: {0}\")]\n    ResponseSerializationError(serde_json::Error),\n    #[error(\"Error while preparing the response: {0}\")]\n    ResponsePreparationError(axum::http::Error),\n}\n\nimpl TraceableError for Error {\n    fn visibility(&self) -> ErrorVisibility {\n        ErrorVisibility::Internal\n    }\n}","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plugins/pre-response-plugin/src/execute/common.rs#L3-L39","documentation":"Generic reqwest::Error surface for the pre-response plugin executor, covering failures like response-body read errors that don't map to the specific build/send variants.","triggerScenarios":"The hook connection drops while the engine reads the response body, or another reqwest operation fails outside the explicit send/build paths.","commonSituations":"Plugin aborting mid-response; aggressive proxy/LB idle timeouts cutting the stream.","solutions":["Read the wrapped reqwest error for the category (body read, decode, redirect).","Check plugin logs for panics or aborts at the same timestamp.","Tune proxy idle/read timeouts between engine and plugin."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"Err(Error::ReqwestError(ref e)) if e.is_timeout() || e.is_body() => retry_with_backoff().await","preventionTips":["Tune LB/proxy idle timeouts above hook processing time.","Stream responses defensively; handle mid-body disconnects.","Track hook latency to preempt slow-read failures."],"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"}