hasura/graphql-engine · error · Error

Internal error from plugin {plugin_name}

Error message

Internal error from plugin {plugin_name}

What it means

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.

Source

Thrown at v3/crates/plugins/pre-ndc-request-plugin/src/execute.rs:26

    header::{InvalidHeaderName, InvalidHeaderValue},
};
use serde::{Deserialize, Serialize};
use std::{collections::BTreeMap, str::FromStr, sync::Arc};
use tracing_util::{ErrorVisibility, SpanVisibility, TraceableError, set_attribute_on_active_span};

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("Error while making the HTTP request to the pre-parse plugin {0} - {1}")]
    ErrorWhileMakingHTTPRequestToTheHook(String, reqwest::Error),
    #[error("Error while building the request for the pre-parse plugin {0} - {1}")]
    BuildRequestError(String, #[source] BuildRequestError),
    #[error("Reqwest error: {0}")]
    ReqwestError(reqwest::Error),
    #[error("Unexpected status code: {0}")]
    UnexpectedStatusCode(u16),
    #[error("Error parsing the request: {0}")]
    PluginRequestParseError(serde_json::error::Error),
    #[error("Internal error from plugin {plugin_name}")]
    PluginInternalError {
        plugin_name: String,
        error: serde_json::Value,
    },
    #[error("User error from plugin {plugin_name}")]
    PluginUserError {
        plugin_name: String,
        error: serde_json::Value,
    },
}

#[derive(Debug, thiserror::Error)]
pub enum BuildRequestError {
    #[error("Invalid header name {header_name}: {error}")]
    InvalidHeaderName {
        header_name: String,
        #[source]
        error: InvalidHeaderName,

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Inspect the error JSON payload — it contains the plugin's own message and stack/details
  2. Check the plugin process logs for the underlying exception or panic
  3. Verify plugin configuration (env vars, downstream service credentials) is present at deploy time
  4. If the plugin is third-party, report the payload to its maintainer or pin a stable version
Defensive patterns

Strategy: try-catch

Try / catch

match result {
    Err(Error::PluginInternalError { plugin_name, error }) => {
        // log plugin detail, alert the plugin owner, fail the request
    }
    other => other,
}

Prevention

When it happens

Trigger: 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 }.

Common situations: 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.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/bd6928f29d1abd9e. Report an issue: GitHub.