{"record":{"id":"70ea6f3bf96da829","repo":"databendlabs/databend","slug":"value-for-enable-virtual-host-style-is-invalid-e","errorCode":null,"errorMessage":"value for enable_virtual_host_style is invalid: {err:?}","messagePattern":"value for enable_virtual_host_style is invalid: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/query/sql/src/planner/binder/location.rs","lineNumber":152,"sourceCode":"        }\n    }\n    .to_string();\n\n    let master_key = l.connection.get(\"master_key\").cloned().unwrap_or_default();\n\n    let enable_virtual_host_style = {\n        if let Some(s) = l.connection.get(\"enable_virtual_host_style\") {\n            s\n        } else {\n            \"false\"\n        }\n    }\n    .to_string()\n    .parse()\n    .map_err(|err| {\n        Error::new(\n            ErrorKind::InvalidInput,\n            anyhow!(\"value for enable_virtual_host_style is invalid: {err:?}\"),\n        )\n    })?;\n\n    let role_arn = {\n        if let Some(role) = l.connection.get(\"role_arn\") {\n            role\n        } else if let Some(role) = l.connection.get(\"aws_role_arn\") {\n            role\n        } else {\n            \"\"\n        }\n    }\n    .to_string();\n\n    let external_id = {\n        if let Some(id) = l.connection.get(\"external_id\") {\n            id\n        } else if let Some(id) = l.connection.get(\"aws_external_id\") {","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/databendlabs/databend/blob/288d84d76e20a2f8f7173bda9691eb6ece301aa9/src/query/sql/src/planner/binder/location.rs#L134-L170","documentation":"When binding an S3-style URI location (e.g. CREATE CONNECTION / STAGE with CONNECTION options), Databend parses the enable_virtual_host_style connection option with Rust's bool::from_str, which only accepts exactly \"true\" or \"false\". If the option is present but is any other string, the parse fails and this InvalidInput error is thrown from parse_s3_params. It means the option value is not a valid boolean literal.","triggerScenarios":"Executing SQL like CREATE STAGE ... URL='s3://bucket/path' CONNECTION=(ENABLE_VIRTUAL_HOST_STYLE = 'yes') or any value other than exactly true/false (case-sensitive): '1', 'True', 'on', empty string.","commonSituations":"Copy-pasting config from other tools that accept yes/1/True; shell/templating injecting an unset variable leaving an empty or junk value; typos like 'ttrue'.","solutions":["Change the option value to exactly 'true' or 'false' (lowercase, no quotes variation)","Remove the ENABLE_VIRTUAL_HOST_STYLE option entirely if you want the default (false)","Check for variable interpolation/templating that may have substituted an unexpected value"],"exampleFix":"-- before\nCREATE STAGE s URL='s3://bucket/' CONNECTION=(ENABLE_VIRTUAL_HOST_STYLE='yes');\n-- after\nCREATE STAGE s URL='s3://bucket/' CONNECTION=(ENABLE_VIRTUAL_HOST_STYLE='true');","handlingStrategy":"validation","validationCode":"let v = opts.get(\"enable_virtual_host_style\").unwrap_or(\"false\");\nif !matches!(v, \"true\" | \"false\") {\n    return Err(format!(\"enable_virtual_host_style must be 'true' or 'false', got {v:?}\"));\n}","typeGuard":"fn is_valid_bool_str(s: &str) -> bool { matches!(s, \"true\" | \"false\") }","tryCatchPattern":null,"preventionTips":["Only emit lowercase 'true'/'false' when generating DDL","Validate connection option values before issuing SQL","Avoid templating booleans from env vars without coercion"],"tags":["rust","storage","s3","config-validation"],"backgroundTag":"invalid-config-value","analyzedSha":"288d84d76e20a2f8f7173bda9691eb6ece301aa9","analyzedAt":"2026-09-11T11:29:36.208Z","contentChangedAt":"2026-09-11T11:29:36.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}