risingwavelabs/risingwave · error · InvalidOptionError
Invalid option: {message}
Error message
Invalid option: {message} What it means
InvalidOptionError is a typed schema-module error raised when a connector/schema option key or value is invalid — typically an unrecognized or malformed option under the schema.* namespace (schema.location, schema.registry, schema.registry.name.strategy, aws.glue.schema_arn).
Source
Thrown at src/connector/src/schema/mod.rs:32
use crate::error::ConnectorError;
pub mod avro;
mod loader;
pub mod protobuf;
pub mod schema_registry;
pub use loader::{ConfluentSchemaLoader, SchemaLoader, SchemaVersion};
const MESSAGE_NAME_KEY: &str = "message";
const KEY_MESSAGE_NAME_KEY: &str = "key.message";
const SCHEMA_LOCATION_KEY: &str = "schema.location";
const SCHEMA_REGISTRY_KEY: &str = "schema.registry";
const NAME_STRATEGY_KEY: &str = "schema.registry.name.strategy";
pub const AWS_GLUE_SCHEMA_ARN_KEY: &str = "aws.glue.schema_arn";
#[derive(Debug, thiserror::Error, thiserror_ext::Macro)]
#[error("Invalid option: {message}")]
pub struct InvalidOptionError {
pub message: String,
// #[backtrace]
// source: Option<risingwave_common::error::BoxedError>,
}
#[derive(Debug, thiserror::Error, thiserror_ext::Macro)]
#[error("Malformed response: {message}")]
pub struct MalformedResponseError {
pub message: String,
}
#[derive(Debug, thiserror::Error)]
pub enum SchemaFetchError {
#[error(transparent)]
InvalidOption(#[from] InvalidOptionError),
#[error(transparent)]
License(#[from] risingwave_common::license::FeatureNotAvailable),View on GitHub (pinned to 6469eb736d)
Solutions
- Correct the option key/value per docs (schema.location, schema.registry, schema.registry.name.strategy, aws.glue.schema_arn).
- Remove unsupported options from the WITH clause.
- Check the RisingWave version's supported option list, as names change across releases.
Example fix
// before WITH (schema.registery = 'http://localhost:8081') // after WITH (schema.registry = 'http://localhost:8081')
Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED_SCHEMA_OPTS: &[&str] = &[
"schema.location", "schema.registry", "schema.registry.name.strategy", "aws.glue.schema_arn"
];
fn validate_schema_opts(opts: &[(&str, &str)]) -> Result<(), String> {
opts.iter().filter(|(k, _)| k.starts_with("schema.") || k.starts_with("aws.glue."))
.find(|(k, _)| !ALLOWED_SCHEMA_OPTS.contains(k))
.map_or(Ok(()), |(k, _)| Err(format!("invalid schema option: {k}")))
} Prevention
- Keep a checked list of valid schema.* options per RisingWave version.
- Copy options only from official docs, not stale blog posts.
- Diff options against SHOW syntax in docs when upgrading versions.
When it happens
Trigger: Passing an unknown schema.* option in WITH clauses, or a value failing validation when schema code parses options into typed config.
Common situations: Typos like schema.registery; wrong name-strategy value; leftover options from a different connector version; documenting/validating WITH options for Protobuf/Avro schema registry sources.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- unrecognized configs: {:?}
- Invalid value for Bounded strategy: must be positive integer
- Invalid value for Ratio strategy: must be between 0.0 and 1.
- schema invalid, record type required at top level of the sch
- NATS connect mode `user_and_password` requires both `user` a
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/d9be29d006996025.
Report an issue: GitHub.