{"record":{"id":"941dc8452ca3e96f","repo":"hatoo/oha","slug":"invalid-form-format-missing-in","errorCode":null,"errorMessage":"Invalid form format: missing '=' in '{}'","messagePattern":"Invalid form format: missing '=' in '(.+?)'","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/curl_compat.rs","lineNumber":103,"sourceCode":"        format!(\"----formdata-oha-{hex_string}\")\n    }\n}\n\nimpl FromStr for FormPart {\n    type Err = anyhow::Error;\n\n    /// Parse curl's -F format string\n    /// Supports formats like:\n    /// - `name=value`\n    /// - `name=@filename` (file upload with filename)\n    /// - `name=<filename` (file upload without filename)\n    /// - `name=@filename;type=content-type`\n    /// - `name=value;filename=name`\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        // Split on first '=' to separate name from value/options\n        let (name, rest) = s\n            .split_once('=')\n            .ok_or_else(|| anyhow::anyhow!(\"Invalid form format: missing '=' in '{}'\", s))?;\n\n        let name = name.to_string();\n\n        // Parse the value part which may contain semicolon-separated options\n        let parts: Vec<&str> = rest.split(';').collect();\n        let value_part = parts[0];\n\n        let mut filename = None;\n        let mut content_type = None;\n        let data;\n\n        // Check if this is a file upload (@filename or <filename)\n        if let Some(file_path) = value_part.strip_prefix('@') {\n            // Remove '@' prefix\n\n            // Read file content\n            data = std::fs::read(file_path)\n                .map_err(|e| anyhow::anyhow!(\"Failed to read file '{}': {}\", file_path, e))?;","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/hatoo/oha/blob/4efba2d113d165aaaf7533f5d2893e7cc57ebfc1/src/curl_compat.rs#L85-L121","documentation":"Validation guard in FormPart::from_str (which parses curl's -F argument syntax). It fires when the -F string contains no '=' at all, so the part cannot be split into a name and a value/options section — e.g. '-F value_without_name'. Any -F argument missing the required name=value separator triggers it.","triggerScenarios":"Thrown at src/curl_compat.rs:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rewrite the -F argument as name=value, e.g. '-F name=content' or '-F file=@path/to/file'.","If passing a bare filename, prefix it with a field name: '-F upload=@filename'.","Check shell quoting so '=' is not consumed or split by the shell before reaching the parser."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4efba2d113d165aaaf7533f5d2893e7cc57ebfc1","analyzedAt":"2026-09-09T16:24:23.306Z","contentChangedAt":"2026-09-09T16:24:23.306Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}