{"record":{"id":"a509d1778dc013d0","repo":"hasura/graphql-engine","slug":"internal-error-from-plugin-plugin-name-a509d1","errorCode":null,"errorMessage":"Internal error from plugin {plugin_name}","messagePattern":"Internal error from plugin (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/plugins/pre-ndc-response-plugin/src/execute.rs","lineNumber":26,"sourceCode":"    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,\n    },\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum BuildRequestError {\n    #[error(\"Invalid header name {header_name}: {error}\")]\n    InvalidHeaderName {\n        header_name: String,\n        #[source]\n        error: InvalidHeaderName,","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plugins/pre-ndc-response-plugin/src/execute.rs#L8-L44","documentation":"The pre-NDC-response plugin reported an internal error in its structured payload. The engine passes through the plugin name and the raw JSON error detail. This is a failure inside the plugin itself (bug, dependency failure, panic), not an invalid engine request or an unreachable endpoint.","triggerScenarios":"The hook responds with its internal-error body/status and the engine maps it to PluginInternalError { plugin_name, error }.","commonSituations":"Post-processing plugin crashing on an edge-case response shape; plugin losing connection to its own backing service; out-of-memory or timeout inside the plugin runtime.","solutions":["Read the passthrough error JSON — it carries the plugin's own message/details","Inspect the plugin process logs at the timestamp of the failure","Reproduce with the same response payload to find the crashing code path","Pin a known-good plugin version if a recent update introduced the failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(Error::PluginInternalError { plugin_name, error }) = res {\n    // alert plugin owner with passthrough detail; do not retry\n}","preventionTips":["Monitor plugin error rates","Fuzz plugins with edge-case response shapes in CI"],"tags":["rust","plugin","internal-error","http","ndc"],"backgroundTag":"plugin-internal-error","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}