{"record":{"id":"0842ff4f33dfc539","repo":"risingwavelabs/risingwave","slug":"catalog-type-must-not-be-set-when-hosted-catalo","errorCode":null,"errorMessage":"`catalog.type` must not be set when `hosted_catalog` is set","messagePattern":"`catalog\\.type` must not be set when `hosted_catalog` is set","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/connector_common/connection.rs","lineNumber":274,"sourceCode":"                    let op = Operator::new(builder)?;\n                    op.check().await?;\n                }\n                _ => {\n                    bail!(\"Unsupported scheme: {}\", scheme);\n                }\n            }\n        }\n\n        if env_var_is_true(DISABLE_DEFAULT_CREDENTIAL)\n            && matches!(common.enable_config_load, Some(true))\n        {\n            bail!(\"`enable_config_load` can't be enabled in this environment\");\n        }\n\n        if common.hosted_catalog.unwrap_or(false) {\n            // If `hosted_catalog` is set, we don't need to test the catalog, but just ensure no catalog fields are set.\n            if common.catalog_type.is_some() {\n                bail!(\"`catalog.type` must not be set when `hosted_catalog` is set\");\n            }\n            if common.catalog_uri.is_some() {\n                bail!(\"`catalog.uri` must not be set when `hosted_catalog` is set\");\n            }\n            if common.catalog_name.is_some() {\n                bail!(\"`catalog.name` must not be set when `hosted_catalog` is set\");\n            }\n            if self.jdbc_user.is_some() {\n                bail!(\"`catalog.jdbc.user` must not be set when `hosted_catalog` is set\");\n            }\n            if self.jdbc_password.is_some() {\n                bail!(\"`catalog.jdbc.password` must not be set when `hosted_catalog` is set\");\n            }\n            return Ok(());\n        }\n\n        if common.catalog_type.is_none() {\n            bail!(\"`catalog.type` must be set\");","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/connection.rs#L256-L292","documentation":"Raised in `IcebergConnection::validate_connection` as part of the hosted-catalog validation block. When `hosted_catalog = true`, the platform provisions and manages the Iceberg catalog itself, so the user must not supply any explicit catalog settings; `catalog.type` being set conflicts with that mode and validation bails.","triggerScenarios":"Calling validate_connection on an Iceberg connection where `hosted_catalog` is true AND `catalog.type` is set to any value.","commonSituations":"Merging a hosted-catalog template with a self-managed catalog config left over from an older connection definition; explicitly setting `catalog.type='rest'` while also enabling `hosted_catalog`.","solutions":["Remove the `catalog.type` option from the connection when using `hosted_catalog = true`.","If you need a custom catalog, remove `hosted_catalog = true` instead and supply the full catalog configuration."],"exampleFix":"// before\nWITH (connector='iceberg', hosted_catalog=true, catalog.type='rest', catalog.uri='https://...')\n// after\nWITH (connector='iceberg', hosted_catalog=true)","handlingStrategy":"validation","validationCode":"if hosted_catalog && catalog_type.is_some() { return Err(\"catalog.type must be unset when hosted_catalog=true\"); }","typeGuard":"fn hosted_catalog_options_valid(opts: &Options) -> bool {\n    !(opts.hosted_catalog.unwrap_or(false)\n        && (opts.catalog_type.is_some() || opts.catalog_uri.is_some() || opts.catalog_name.is_some()\n            || opts.jdbc_user.is_some() || opts.jdbc_password.is_some()))\n}","tryCatchPattern":"if let Err(e) = conn.validate_connection().await {\n    if e.to_string().contains(\"when `hosted_catalog` is set\") {\n        return Err(UserError::ConflictingOptions(\"hosted_catalog excludes explicit catalog options\"));\n    }\n    return Err(e.into());\n}","preventionTips":["Strip all catalog.* options from templates when hosted_catalog=true","Use a single config source for hosted vs self-managed catalogs","Lint CREATE statements for hosted_catalog + catalog.* combinations"],"tags":["iceberg","validation","conflicting-options","hosted-catalog"],"backgroundTag":"mutually-exclusive-options","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}