{"record":{"id":"147bc05e6cc44369","repo":"hasura/graphql-engine","slug":"error-while-making-the-http-request-to-the-pre-res","errorCode":null,"errorMessage":"Error while making the HTTP request to the pre-response plugin {0} - {1}","messagePattern":"Error while making the HTTP request to the pre-response plugin (.+?) - (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/plugins/pre-ndc-response-plugin/src/execute.rs","lineNumber":16,"sourceCode":"use axum::http::HeaderName;\nuse engine_types::HttpContext;\nuse hasura_authn_core::{Role, Session, SessionVariableName};\nuse metadata_resolve::{DataConnectorLink, Qualified, ResolvedLifecyclePreNdcResponsePluginHook};\nuse open_dds::data_connector::DataConnectorName;\nuse reqwest::{\n    Client,\n    header::{InvalidHeaderName, InvalidHeaderValue},\n};\nuse serde::{Deserialize, Serialize};\nuse std::{collections::BTreeMap, str::FromStr, sync::Arc};\nuse tracing_util::{ErrorVisibility, SpanVisibility, TraceableError, set_attribute_on_active_span};\n\n#[derive(Debug, thiserror::Error)]\npub enum Error {\n    #[error(\"Error while making the HTTP request to the pre-response plugin {0} - {1}\")]\n    ErrorWhileMakingHTTPRequestToTheHook(String, reqwest::Error),\n    #[error(\"Error while building the request for the pre-response plugin {0} - {1}\")]\n    BuildRequestError(String, #[source] BuildRequestError),\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(\"Internal error from plugin {plugin_name}\")]\n    PluginInternalError {\n        plugin_name: String,\n        error: serde_json::Value,\n    },\n    #[error(\"User error from plugin {plugin_name}\")]\n    PluginUserError {\n        plugin_name: String,\n        error: serde_json::Value,","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plugins/pre-ndc-response-plugin/src/execute.rs#L1-L34","documentation":"The engine could not complete the outbound HTTP call to the configured pre-NDC-response (post-response) hook plugin: connection refused, DNS failure, timeout, or TLS error. The two placeholders carry the plugin name and the underlying reqwest::Error. It fires before any status code is received — the plugin endpoint was unreachable at the URL from config.","triggerScenarios":"Executing a request whose response triggers the pre-response hook; reqwest's .send() returns Err (plugin service down, wrong URL/port, DNS not resolvable, TLS handshake failure, timeout).","commonSituations":"Plugin not deployed or crashed; wrong URL in the connector's plugin webhook config; network policy blocking engine→plugin traffic in Kubernetes; TLS cert mismatch when using https webhooks.","solutions":["Check the plugin service is running and healthy (curl the plugin URL from the engine pod)","Verify the webhook URL, port, and scheme in the plugin config","Test DNS resolution and network connectivity from the engine's environment","If TLS is used, confirm the certificate is trusted and matches the hostname"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight: is the hook reachable?\nasync fn reachable(url: &str) -> bool { reqwest::get(url).await.map(|r| r.status().is_success()).unwrap_or(false) }","typeGuard":null,"tryCatchPattern":"match client.post(&url).json(&body).send().await {\n    Err(e) if e.is_connect() || e.is_timeout() => retry_with_backoff(),\n    other => other,\n}","preventionTips":["Run plugins as healthy sidecars with readiness probes","Set explicit connect/read timeouts","Validate webhook URLs at config load"],"tags":["rust","network","http","plugin","webhook"],"backgroundTag":"connection-refused","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}