{"record":{"id":"bd6928f29d1abd9e","repo":"hasura/graphql-engine","slug":"internal-error-from-plugin-plugin-name","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-request-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-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, #[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-request-plugin/src/execute.rs#L8-L44","documentation":"The remote pre-NDC-request plugin returned a structured internal error payload. The engine forwards the plugin name and the raw JSON error details so the operator can see which plugin failed and why. This represents a bug or unexpected failure inside the plugin process itself, not a problem with the request the engine sent.","triggerScenarios":"The plugin responds with its internal-error status/body (e.g. HTTP 500 with a JSON error detail), and the engine maps that body to Error::PluginInternalError { plugin_name, error }.","commonSituations":"A plugin hook throwing an unhandled exception (DB failure, panic, missing config env var); plugin deployed without required secrets/configuration; plugin runtime (Node/Python) crashing mid-request.","solutions":["Inspect the error JSON payload — it contains the plugin's own message and stack/details","Check the plugin process logs for the underlying exception or panic","Verify plugin configuration (env vars, downstream service credentials) is present at deploy time","If the plugin is third-party, report the payload to its maintainer or pin a stable version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n    Err(Error::PluginInternalError { plugin_name, error }) => {\n        // log plugin detail, alert the plugin owner, fail the request\n    }\n    other => other,\n}","preventionTips":["Run plugin health checks before routing traffic to it","Alert on plugin 5xx rates","Keep plugin dependencies and secrets configured via deployment tooling"],"tags":["rust","plugin","http","internal-error","ndc"],"backgroundTag":"plugin-internal-error","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}