{"record":{"id":"6313c6175a9f9ef3","repo":"risingwavelabs/risingwave","slug":"catalog-uri-must-not-be-set-when-hosted-catalog","errorCode":null,"errorMessage":"`catalog.uri` must not be set when `hosted_catalog` is set","messagePattern":"`catalog\\.uri` 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":277,"sourceCode":"                _ => {\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\");\n        }\n\n        // Test catalog","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/connector_common/connection.rs#L259-L295","documentation":"Same hosted-catalog validation block in `IcebergConnection::validate_connection`: with `hosted_catalog = true` the catalog endpoint is managed by the platform, so an explicit `catalog.uri` conflicts with hosted mode and validation rejects the connection.","triggerScenarios":"Calling validate_connection where `hosted_catalog` is true AND `catalog.uri` is set.","commonSituations":"Copying a self-managed REST-catalog config (which always has `catalog.uri`) and additionally enabling `hosted_catalog`; leftover options from a previous connection DDL.","solutions":["Remove `catalog.uri` from the connection options when `hosted_catalog = true`.","Alternatively disable `hosted_catalog` and keep an explicit `catalog.uri` with the appropriate catalog type."],"exampleFix":"// before\nWITH (connector='iceberg', hosted_catalog=true, catalog.uri='https://rest.example.com')\n// after\nWITH (connector='iceberg', hosted_catalog=true)","handlingStrategy":"validation","validationCode":"if hosted_catalog && catalog_uri.is_some() { return Err(\"catalog.uri must be unset when hosted_catalog=true\"); }","typeGuard":null,"tryCatchPattern":"match validate_connection(&conn).await {\n    Err(e) if e.to_string().contains(\"`catalog.uri` must not be set\") => warn_user_and_abort(),\n    other => other,\n}","preventionTips":["Remove catalog.uri in hosted-catalog configs","Differentiate hosted vs self-managed config templates","Validate options before DDL execution"],"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"}