hasura/graphql-engine · error · DataConnectorError::InvalidHeaderName
Invalid header name {header_name} specified
Error message
Invalid header name {header_name} specified What it means
A header name configured on the data connector is not a valid HTTP header name (rejected by the header name parser).
Source
Thrown at v3/crates/metadata-resolve/src/stages/data_connectors/error.rs:26
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 {
version: String,
requirement: semver::VersionReq,View on GitHub (pinned to 724551b9ae)
Solutions
- Fix the header name to valid HTTP token syntax (letters, digits, '-', no spaces)
- Rebuild metadata
Defensive patterns
Strategy: validation
Validate before calling
http::HeaderName::from_bytes(name.as_bytes())?;
Try / catch
Catch InvalidHeaderName and report the offending header name.
Prevention
- Use standard header-name syntax
- Avoid copy-pasting headers from prose/docs
When it happens
Trigger: Setting headers on a connector with an invalid name, e.g. containing spaces, non-ASCII characters, or invalid punctuation.
Common situations: Copy-pasting header names with hidden characters, using 'X My Header' style names, or template placeholders left in the name.
Related errors
- Invalid value specified for header {header_name}
- Header '{0}', used in the auth config, is not a valid header
- Header value '{0}' is not a valid header value for header '{
- Error while preparing the response: {0}
- Invalid header name {0}
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/c508eb7d4843333f.
Report an issue: GitHub.