risingwavelabs/risingwave · error · SchemaFetchError::InvalidUuid

schema version id invalid: {0}

Error message

schema version id invalid: {0}

What it means

SchemaFetchError::InvalidUuid wraps a uuid::Error: a schema version identifier expected to be a UUID could not be parsed. Used when a registry response (e.g. AWS Glue / Confluent with GUIDs) yields an invalid UUID string.

Source

Thrown at src/connector/src/schema/mod.rs:57

#[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),
    #[error(transparent)]
    Request(#[from] schema_registry::ConcurrentRequestError),
    #[error(transparent)]
    AwsGlue(#[from] Box<aws_sdk_glue::operation::get_schema_version::GetSchemaVersionError>),
    #[error(transparent)]
    MalformedResponse(#[from] MalformedResponseError),
    #[error("schema version id invalid: {0}")]
    InvalidUuid(#[from] uuid::Error),
    #[error("schema compilation error: {0}")]
    SchemaCompile(
        #[source]
        #[backtrace]
        risingwave_common::error::BoxedError,
    ),
    #[error("{0}")] // source+{0} is effectively transparent but allows backtrace
    YetToMigrate(
        #[source]
        #[backtrace]
        ConnectorError,
    ),
    #[error("schema registry client error: {0}")]
    Client(#[from] schema_registry::SchemaRegistryClientError),
}

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Check the schema version id/GUID string is a complete, well-formed UUID.
  2. Re-fetch the schema version from the registry to obtain a valid UUID.
  3. Verify you're referencing the right registry/ARN (Glue registry vs schema id).

Example fix

// before
let id = Uuid::parse_str("550e8400")?; // truncated
// after
let id = Uuid::parse_str("550e8400-e29b-41d4-a716-446655440000")?;
Defensive patterns

Strategy: validation

Validate before calling

fn is_valid_uuid(s: &str) -> bool {
    uuid::Uuid::parse_str(s).is_ok()
}

Try / catch

match fetch_schema_version(id) {
    Err(e) if e.to_string().starts_with("schema version id invalid") => {
        // re-fetch/repair the UUID before retrying
    }
    Err(e) => return Err(e.into()),
    Ok(s) => s,
}

Prevention

When it happens

Trigger: Converting a schema version id (string) to uuid::Uuid with FromStr/try_from and the string is not a valid UUID — empty, truncated, or non-UUID id returned by the registry or supplied in config.

Common situations: AWS Glue schema ARNs/versions mismatched; copying a partial UUID into schema config; registry returning a numeric version where a UUID GUID was expected.

Understand the failure class

Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/72c7949533d76b79. Report an issue: GitHub.