{"record":{"id":"dd7799bb06eb9196","repo":"risingwavelabs/risingwave","slug":"invalid-header-format","errorCode":null,"errorMessage":"Invalid header format: {}","messagePattern":"Invalid header format: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/iceberg/mod.rs","lineNumber":586,"sourceCode":"        let user_agent = match Deployment::current() {\n            Deployment::Ci => \"RisingWave(CI)\".to_owned(),\n            Deployment::Cloud => \"RisingWave(Cloud)\".to_owned(),\n            Deployment::Other => \"RisingWave(OSS)\".to_owned(),\n        };\n        if self.vended_credentials() {\n            headers.insert(\n                \"X-Iceberg-Access-Delegation\".to_owned(),\n                \"vended-credentials\".to_owned(),\n            );\n        }\n        headers.insert(\"User-Agent\".to_owned(), user_agent);\n        if let Some(header) = &self.catalog_header {\n            for pair in header.split(';') {\n                let mut parts = pair.split('=');\n                if let (Some(key), Some(value)) = (parts.next(), parts.next()) {\n                    headers.insert(key.to_owned(), value.to_owned());\n                } else {\n                    bail!(\"Invalid header format: {}\", pair);\n                }\n            }\n        }\n        Ok(headers)\n    }\n\n    pub fn enable_config_load(&self) -> bool {\n        // If the env var is set to true, we disable the default config load. (Cloud environment)\n        if env_var_is_true(DISABLE_DEFAULT_CREDENTIAL) {\n            if matches!(self.enable_config_load, Some(true)) {\n                tracing::warn!(\n                    \"`enable_config_load` can't be enabled in SaaS environment, the behavior might be unexpected\"\n                );\n            }\n            return false;\n        }\n        self.enable_config_load.unwrap_or(false)\n    }","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/iceberg/mod.rs#L568-L604","documentation":"The `headers()` parser splits `catalog.header` on ';' then each pair on '=' and requires both a key and a value. A segment that does not yield both (e.g. empty segment or no '=') bails with `Invalid header format` showing the offending pair.","triggerScenarios":"`catalog.header` containing an empty segment (double ';' or trailing ';'), or a token without '=' such as 'Authorization' with no value.","commonSituations":"Trailing semicolons after the last header; pasting a single header line without 'key=value'; whitespace-only segments.","solutions":["Format each header as `key=value`, separated by ';': e.g. `catalog.header = 'X-Client=wave;Authorization=Bearer xyz'`.","Remove trailing/leading semicolons and empty segments.","Ensure every pair contains '='; omit headers you cannot supply a value for."],"exampleFix":"// before\ncatalog.header = 'Authorization=Bearer abc;'\n// after\ncatalog.header = 'Authorization=Bearer abc'","handlingStrategy":"validation","validationCode":"function validateHeaderStr(h) {\n  if (h === '') return;\n  for (const pair of h.split(';')) {\n    if (pair.length === 0 || !pair.includes('=')) {\n      throw new Error(`Invalid header format: ${pair}`);\n    }\n  }\n}","typeGuard":"const isValidHeaderStr = (h) => h.split(';').every(p => p.includes('='));","tryCatchPattern":"catch (e) { if (String(e).startsWith('Invalid header format')) { /* echo the bad pair and show key=value;key2=value2 syntax */ } else { throw e; } }","preventionTips":["Always use key=value pairs joined by ';', never a trailing semicolon.","Validate with a regex like /^[^=;]+=[^=;]*(;[^=;]+=[^=;]*)*$/ before submitting.","Build the header string programmatically from a map rather than hand-editing."],"tags":["iceberg","config-parsing","http-headers"],"backgroundTag":"invalid-argument-format","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}