risingwavelabs/risingwave · error · ConnectorError
`catalog.type` must not be set when `hosted_catalog` is set
Error message
`catalog.type` must not be set when `hosted_catalog` is set
What it means
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.
Source
Thrown at src/connector/src/connector_common/connection.rs:274
let op = Operator::new(builder)?;
op.check().await?;
}
_ => {
bail!("Unsupported scheme: {}", scheme);
}
}
}
if env_var_is_true(DISABLE_DEFAULT_CREDENTIAL)
&& matches!(common.enable_config_load, Some(true))
{
bail!("`enable_config_load` can't be enabled in this environment");
}
if common.hosted_catalog.unwrap_or(false) {
// If `hosted_catalog` is set, we don't need to test the catalog, but just ensure no catalog fields are set.
if common.catalog_type.is_some() {
bail!("`catalog.type` must not be set when `hosted_catalog` is set");
}
if common.catalog_uri.is_some() {
bail!("`catalog.uri` must not be set when `hosted_catalog` is set");
}
if common.catalog_name.is_some() {
bail!("`catalog.name` must not be set when `hosted_catalog` is set");
}
if self.jdbc_user.is_some() {
bail!("`catalog.jdbc.user` must not be set when `hosted_catalog` is set");
}
if self.jdbc_password.is_some() {
bail!("`catalog.jdbc.password` must not be set when `hosted_catalog` is set");
}
return Ok(());
}
if common.catalog_type.is_none() {
bail!("`catalog.type` must be set");View on GitHub (pinned to 6469eb736d)
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.
Example fix
// before WITH (connector='iceberg', hosted_catalog=true, catalog.type='rest', catalog.uri='https://...') // after WITH (connector='iceberg', hosted_catalog=true)
Defensive patterns
Strategy: validation
Validate before calling
if hosted_catalog && catalog_type.is_some() { return Err("catalog.type must be unset when hosted_catalog=true"); } Type guard
fn hosted_catalog_options_valid(opts: &Options) -> bool {
!(opts.hosted_catalog.unwrap_or(false)
&& (opts.catalog_type.is_some() || opts.catalog_uri.is_some() || opts.catalog_name.is_some()
|| opts.jdbc_user.is_some() || opts.jdbc_password.is_some()))
} Try / catch
if let Err(e) = conn.validate_connection().await {
if e.to_string().contains("when `hosted_catalog` is set") {
return Err(UserError::ConflictingOptions("hosted_catalog excludes explicit catalog options"));
}
return Err(e.into());
} Prevention
- 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
When it happens
Trigger: Calling validate_connection on an Iceberg connection where `hosted_catalog` is true AND `catalog.type` is set to any value.
Common situations: 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`.
Related errors
- `catalog.uri` must not be set when `hosted_catalog` is set
- `catalog.name` must not be set when `hosted_catalog` is set
- `catalog.jdbc.user` must not be set when `hosted_catalog` is
- `catalog.jdbc.password` must not be set when `hosted_catalog
- `warehouse.path` must be set
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/0842ff4f33dfc539.
Report an issue: GitHub.