{"record":{"id":"c6d69bdf23399aa2","repo":"risingwavelabs/risingwave","slug":"unknown-connection-connection-name-c6d69b","errorCode":null,"errorMessage":"Unknown connection: {connection_name}","messagePattern":"Unknown connection: (.+?)","errorType":"validation","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/with_options_test.rs","lineNumber":823,"sourceCode":"    for field in fields {{\n        if !allowed_fields.contains(field) {{\n            return Err(ConnectorError::from(anyhow::anyhow!(\n                \"Field '{{field}}' is not allowed to be altered on the fly for connector: {{connector_name}}\"\n            )));\n        }}\n    }}\n    Ok(())\n}}\n\npub fn check_connection_allow_alter_on_fly_fields(\n    connection_name: &str,\n    fields: &[String],\n) -> crate::error::ConnectorResult<()> {{\n    use crate::source::connection_name_to_prop_type_name;\n\n    // Convert connection name to the type name key\n    let Some(type_name) = connection_name_to_prop_type_name(connection_name) else {{\n        return Err(ConnectorError::from(anyhow::anyhow!(\n            \"Unknown connection: {{connection_name}}\"\n        )));\n    }};\n    let Some(allowed_fields) = CONNECTION_ALLOW_ALTER_ON_FLY_FIELDS.get(type_name) else {{\n        return Err(ConnectorError::from(anyhow::anyhow!(\n            \"No allow_alter_on_fly fields registered for connection: {{connection_name}}\"\n        )));\n    }};\n    for field in fields {{\n        if !allowed_fields.contains(field) {{\n            return Err(ConnectorError::from(anyhow::anyhow!(\n                \"Field '{{field}}' is not allowed to be altered on the fly for connection: {{connection_name}}\"\n            )));\n        }}\n    }}\n    Ok(())\n}}\n","sourceCodeStart":805,"sourceCodeEnd":841,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/with_options_test.rs#L805-L841","documentation":"Raised by check_connection_allow_alter_on_fly_fields when connection_name cannot be mapped to a known connection type via connection_name_to_prop_type_name, so the connection's alterable-field registry cannot be looked up.","triggerScenarios":"Passing an unknown connection name (from CREATE CONNECTION / USING CONNECTION) to the allow-alter-on-fly validation, e.g. a typo or a connection type not registered in the codebase.","commonSituations":"Typo in a private-link/ES connection name; referencing a connection type added in a newer version; mixing connection names with connector names by mistake.","solutions":["Use a registered connection type name (e.g. as defined by the connection registry in src/connector/src/source).","Fix typos and casing of the connection name.","If introducing a new connection type, register it in connection_name_to_prop_type_name and its allow fields, then regenerate."],"exampleFix":"// before\ncheck_connection_allow_alter_on_fly_fields(\"privatelink-aws\", &fields)?;\n// after\ncheck_connection_allow_alter_on_fly_fields(\"privatelink\", &fields)?;","handlingStrategy":"validation","validationCode":"fn is_known_connection(name: &str) -> bool {\n    risingwave_connector::source::connection_name_to_prop_type_name(name).is_some()\n}","typeGuard":null,"tryCatchPattern":"match check_connection_allow_alter_on_fly_fields(conn_name, &fields) {\n    Ok(()) => {},\n    Err(e) => eprintln!(\"unknown connection '{}': {}\", conn_name, e),\n}","preventionTips":["Use connection type names from CREATE CONNECTION docs, not instance names","Validate connection names with the registry before schema-change planning"],"tags":["connection","connector","unknown-identifier"],"backgroundTag":"entity-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}