{"record":{"id":"98e296b7cf4d810a","repo":"hasura/graphql-engine","slug":"error-while-making-the-http-request-to-the-pre-par-98e296","errorCode":null,"errorMessage":"Error while making the HTTP request to the pre-parse plugin {0} - {1}","messagePattern":"Error while making the HTTP request to the pre-parse plugin (.+?) - (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/plugins/pre-route-plugin/src/execute.rs","lineNumber":22,"sourceCode":"    http::{HeaderMap, HeaderName, StatusCode},\n    response::IntoResponse,\n};\nuse http_body_util::BodyExt;\nuse 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","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plugins/pre-route-plugin/src/execute.rs#L4-L40","documentation":"The pre-route plugin executor failed to make the HTTP request to its hook at the transport level (connect refused, DNS, timeout). The message text says 'pre-parse plugin' but the variant is defined in the pre-route plugin's executor — the wording is shared across plugin crates. Fields: hook URL and reqwest::Error.","triggerScenarios":"A pre-route plugin is configured; before routing, the engine calls the hook and the TCP/HTTP request itself fails (service unreachable or timing out).","commonSituations":"Pre-route hook not deployed or scaled to zero; wrong service DNS name; startup ordering where the engine is ready before the plugin; network policy blocks the route.","solutions":["Verify the pre-route hook endpoint is reachable from the engine (curl from the same network namespace).","Correct the hook URL in plugin config.","Add readiness-gating so the plugin is healthy before the engine serves traffic.","Adjust timeouts/retries for the hook call."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// startup gate: only enable routing once the hook answers\nif reqwest::get(&cfg.pre_route_hook_url).await.is_err() { delay_enable(); }","typeGuard":null,"tryCatchPattern":"Err(Error::ErrorWhileMakingHTTPRequestToTheHook(_, ref re)) if re.is_connect() => {\n    tracing::warn!(\"pre-route hook down; routing without plugin or retrying\");\n    route_without_plugin().await\n}","preventionTips":["Use readiness probes / startup ordering so the hook is up first.","Configure retries with capped backoff for the hook call.","Monitor connection errors to the hook and alert."],"tags":["network","http","plugin","rust","pre-route-hook"],"backgroundTag":"http-request-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}