{"record":{"id":"2200f5bb80ecd89c","repo":"tinyhumansai/openhuman","slug":"http-cred-header-value-is-empty","errorCode":null,"errorMessage":"http_cred '{}': header value is empty","messagePattern":"http_cred '(.+?)': header value is empty","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/security/credentials/http_creds.rs","lineNumber":153,"sourceCode":"            HttpCredentialScheme::Basic => {\n                let username = self.username.as_deref().unwrap_or_default();\n                let encoded = base64::engine::general_purpose::STANDARD\n                    .encode(format!(\"{username}:{}\", self.secret));\n                Ok((\"Authorization\".to_string(), format!(\"Basic {encoded}\")))\n            }\n            HttpCredentialScheme::Header => {\n                let header_name = self\n                    .header_name\n                    .as_deref()\n                    .map(str::trim)\n                    .filter(|h| !h.is_empty())\n                    .with_context(|| {\n                        format!(\n                            \"http_cred '{}': header scheme requires a non-empty header_name\",\n                            self.name\n                        )\n                    })?;\n                anyhow::ensure!(\n                    !self.secret.trim().is_empty(),\n                    \"http_cred '{}': header value is empty\",\n                    self.name\n                );\n                Ok((header_name.to_string(), self.secret.clone()))\n            }\n        }\n    }\n}\n\n/// Secret-free description of a stored credential — safe to return to the UI /\n/// list surfaces (e.g. a future `flows_list_connections`).\n#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]\n#[serde(rename_all = \"camelCase\")]\npub struct HttpCredentialSummary {\n    pub name: String,\n    pub scheme: String,\n    pub header_name: Option<String>,","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/security/credentials/http_creds.rs#L135-L171","documentation":"Materializing the HTTP credential to a header pair yielded an empty header value. For the Header scheme this means the computed value from the stored secret is empty (trimmed to nothing); the guard in `to_header()` blocks injecting an empty header onto the outbound request.","triggerScenarios":"Thrown at src/openhuman/security/credentials/http_creds.rs:153 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update the credential so its secret is non-empty after trimming","For Header scheme, verify both header_name and secret are set","Re-save the credential from its original source"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}