hasura/graphql-engine · error · DataConnectorError::InvalidDataConnectorUrl

The url for the data connector is invalid: {error}

Error message

The url for the data connector is invalid: {error}

What it means

The URI configured for a data connector failed to parse (url::ParseError). The connector's endpoint must be a valid absolute URL.

Source

Thrown at v3/crates/metadata-resolve/src/stages/data_connectors/error.rs:24

impl ContextualError for NamedDataConnectorError {
    fn create_error_context(&self) -> Option<error_context::Context> {
        None
    }
}

#[derive(Debug, thiserror::Error)]
#[error("The data connector {data_connector_name} has an error: {error}")]
pub struct NamedDataConnectorError {
    pub data_connector_name: Qualified<DataConnectorName>,
    pub error: DataConnectorError,
}

#[derive(Debug, thiserror::Error)]
pub enum DataConnectorError {
    #[error("the data connector is defined more than once")]
    DuplicateDataConnectorDefinition,
    #[error("The url for the data connector is invalid: {error}")]
    InvalidDataConnectorUrl { error: url::ParseError },
    #[error("Invalid header name {header_name} specified")]
    InvalidHeaderName { header_name: String },
    #[error("Invalid value specified for header {header_name}")]
    InvalidHeaderValue { header_name: String },
    #[error("{0}")]
    NdcValidationError(NDCValidationError),
    #[error(
        "The version specified in the capabilities (\"{version}\") is an invalid version: {error}"
    )]
    InvalidNdcVersion {
        version: String,
        error: semver::Error,
    },
    #[error(
        "The version specified in the capabilities (\"{version}\") is not compatible with the schema version specified. The version requirement is {requirement}"
    )]
    IncompatibleNdcVersion {

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Check the connector's uri field
  2. Ensure it is a fully-qualified URL like https://host:port/path
  3. Rebuild

Example fix

# before
uri: "connector-host:8080"
# after
uri: "http://connector-host:8080"
Defensive patterns

Strategy: validation

Validate before calling

url::Url::parse(&connector.uri)?; // fail fast before resolve

Try / catch

Catch InvalidDataConnectorUrl and surface the url::ParseError to the config author.

Prevention

When it happens

Trigger: Setting a connector uri that is malformed — missing scheme, bad port, invalid characters, relative path only.

Common situations: Missing http:// prefix, typo'd URL, trailing whitespace, or environment-variable interpolation leaving an empty/invalid URL.

Related errors


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