{"record":{"id":"f9358ae09006d95d","repo":"hasura/graphql-engine","slug":"0","errorCode":null,"errorMessage":"{0}","messagePattern":"\\{0\\}","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/crates/auth/hasura-authn/src/lib.rs","lineNumber":291,"sourceCode":"    InvalidHeaderValue(String, String),\n}\n\nimpl Warning {\n    pub fn should_be_an_error(&self, flags: &open_dds::flags::OpenDdFlags) -> bool {\n        match self {\n            Warning::InvalidHeaderName(_) | Warning::InvalidHeaderValue(_, _) => {\n                flags.contains(open_dds::flags::Flag::DisallowInvalidHeadersInAuthConfig)\n            }\n            _ => false,\n        }\n    }\n}\n\n#[derive(Debug, thiserror::Error, PartialEq)]\npub enum Error {\n    #[error(\"Invalid URL for auth webhook: {0}\")]\n    InvalidAuthWebhookUrl(String),\n    #[error(\"{0}\")]\n    AuthConfigWarningsAsErrors(SeparatedBy<Warning>),\n    #[error(\"Duplicate alternative mode identifier: '{0}'\")]\n    DuplicateAlternativeModeIdentifier(String),\n}\n\n// A small utility type which exists for the sole purpose of displaying a vector with a certain\n// separator.\n#[derive(Debug, PartialEq)]\npub struct SeparatedBy<T> {\n    pub lines_of: Vec<T>,\n    pub separator: String,\n}\n\nimpl<T: Display> Display for SeparatedBy<T> {\n    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n        for (index, elem) in self.lines_of.iter().enumerate() {\n            elem.fmt(f)?;\n            if index < self.lines_of.len() - 1 {","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/auth/hasura-authn/src/lib.rs#L273-L309","documentation":"Wrapper error that surfaces accumulated auth config warnings as a single error when warnings-as-errors behavior is active (controlled by OpenDD flags). The inner payload lists each Warning (deprecations, invalid headers, etc.) separated by a separator; the build fails because those warnings were promoted to errors.","triggerScenarios":"The `should_be_an_error` flag mapping returns true for the collected warnings (e.g. strict metadata validation flags), so all warnings are aggregated into AuthConfigWarningsAsErrors and returned as a build failure.","commonSituations":"Enabling strict/CI validation flags on a project whose auth metadata still has deprecation warnings (v1/v2/v3 configs) or invalid header names/values.","solutions":["Read the contained warnings and fix each one (upgrade auth config version, fix headers, etc.)","Alternatively disable the OpenDD flag that promotes these warnings to errors, if strictness is not required","Re-run the build; the error disappears once no warnings remain"],"exampleFix":"// before\nflags: { promoteAuthWarningsToErrors: true }\n// with authConfig: { version: 2 } \n// after\nflags: { promoteAuthWarningsToErrors: true }\n// with authConfig: { version: 4 }","handlingStrategy":"try-catch","validationCode":"let warnings = lint_auth_config(&metadata);\nif !warnings.is_empty() && flags.promote_warnings() {\n    return Err(warnings.iter().map(ToString::to_string).collect::<Vec<_>>().join(\"; \"));\n}","typeGuard":null,"tryCatchPattern":"match build_auth_config(&metadata) {\n    Err(Error::AuthConfigWarningsAsErrors(list)) => {\n        for w in list.iter() { log::warn!(\"auth warning: {w}\"); }\n        return Err(\"fix auth warnings before deploy\".into());\n    }\n    r => r,\n}","preventionTips":["Fix deprecation/header warnings as they appear instead of accumulating them","Run metadata lint with strict flags in CI","Keep a migration checklist per engine upgrade"],"tags":["auth","warnings-as-errors","config-validation","opendd-flags"],"backgroundTag":"warnings-promoted-to-errors","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}