conductor-oss/conductor · error · IllegalArgumentException

message + " " + uuidString

Error message

message + " " + uuidString

What it means

Thrown by CassandraBaseDAO.toUUID when UUID.fromString rejects the supplied uuidString. It prepends a caller-provided context message to the bad value and rethrows as IllegalArgumentException (unchecked). It is a guard helper used across the Cassandra DAOs to convert workflow/task ID strings to java.util.UUID.

Source

Thrown at cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraBaseDAO.java:130

    protected final Session session;
    protected final CassandraProperties properties;

    private boolean initialized = false;

    public CassandraBaseDAO(
            Session session, ObjectMapper objectMapper, CassandraProperties properties) {
        this.session = session;
        this.objectMapper = objectMapper;
        this.properties = properties;

        init();
    }

    protected static UUID toUUID(String uuidString, String message) {
        try {
            return UUID.fromString(uuidString);
        } catch (IllegalArgumentException iae) {
            throw new IllegalArgumentException(message + " " + uuidString, iae);
        }
    }

    private void init() {
        try {
            if (!initialized) {
                session.execute(getCreateKeyspaceStatement());
                session.execute(getCreateWorkflowsTableStatement());
                session.execute(getCreateTaskLookupTableStatement());
                session.execute(getCreateTaskDefLimitTableStatement());
                session.execute(getCreateTaskRateLimitTableStatement());
                session.execute(getCreateWorkflowDefsTableStatement());
                session.execute(getCreateWorkflowDefsIndexTableStatement());
                session.execute(getCreateTaskDefsTableStatement());
                session.execute(getCreateEventHandlersTableStatement());
                session.execute(getCreateEventExecutionsTableStatement());
                session.execute(getCreateFileMetadataTableStatement());
                session.execute(getCreateFileMetadataByWorkflowTableStatement());

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Ensure all workflow and task IDs created against a Cassandra-backed Conductor are valid UUIDs (the default ID generator produces them).
  2. If migrating data from another backend, normalize legacy IDs to UUIDs first or use a compatible ID generator.
  3. Catch IllegalArgumentException at the API boundary and return a 400 with the bad ID rather than a 500.
  4. Audit the offending row/value logged in the message to find the source of the malformed ID.

Example fix

// before
return UUID.fromString(uuidString);

// after (existing helper; caller-side guard)
private static final java.util.regex.Pattern UUID_RE =
    java.util.regex.Pattern.compile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
if (!UUID_RE.matcher(uuidString).matches()) {
    throw new IllegalArgumentException("Not a UUID: " + uuidString);
}
Defensive patterns

Strategy: type-guard

Validate before calling

private static final java.util.regex.Pattern UUID_RE =
    java.util.regex.Pattern.compile("^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$");
static boolean isUuid(String s) { return s != null && UUID_RE.matcher(s).matches(); }

Type guard

static boolean isUuid(String s) {
    if (s == null) return false;
    try { java.util.UUID.fromString(s); return true; }
    catch (IllegalArgumentException e) { return false; }
}

Try / catch

try {
    return toUUID(id, "workflow id");
} catch (IllegalArgumentException e) {
    throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "invalid id: " + id, e);
}

Prevention

When it happens

Trigger: Calling toUUID(uuidString, message) with a string that is not a valid RFC-4122 UUID (wrong length, non-hex characters, missing dashes). Internally triggered when a workflowId or taskId read from Cassandra or supplied by a caller is not UUID-shaped.

Common situations: A workflow or task ID generated by a non-UUID ID generator (e.g. string IDs used by the Redis or in-memory DAO) being passed to the Cassandra DAO path. Corrupted/stale data in Cassandra with malformed IDs. A client sending a custom non-UUID correlation ID as the workflow ID.

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/5c7a93f719a02770. Report an issue: GitHub.