quarkusio/quarkus · error · IllegalStateException

You have to specify a description. This is what the user…

Error message

You have to specify a description. This is what the user will see in the console menu

What it means

AssistantConsoleBuildItem.Builder.build() requires a non-blank description; if description is null or blank it throws this IllegalStateException. The description is what the user sees next to the hotkey in the assistant console menu.

Solutions

  1. Call .description("...") with meaningful non-blank text before build()
  2. If the description is dynamic, validate it is non-blank before constructing the build item

Example fix

// before
new AssistantConsoleBuildItem.Builder()
    .key('e')
    .build();
// after
new AssistantConsoleBuildItem.Builder()
    .key('e')
    .description("Explain this build failure")
    .build();
Defensive patterns

Strategy: validation

Validate before calling

if (description == null || description.isBlank()) {
    throw new IllegalArgumentException("AssistantConsoleBuildItem requires a non-blank description");
}

Try / catch

try {
    AssistantConsoleBuildItem item = builder.build();
} catch (IllegalStateException e) {
    logger.error("Set description(...) on the AssistantConsoleBuildItem builder", e);
}

Prevention

When it happens

Trigger: Building an AssistantConsoleBuildItem without calling description(...) or with description("") / whitespace-only text.

Common situations: Extension authors adding console entries who set only the key and message; programmatic description construction yielding an empty string.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/3c0ad17ccbff9692. Report an issue: GitHub.

Appendix: source

Thrown at extensions/assistant/deployment-spi/src/main/java/io/quarkus/assistant/deployment/spi/AssistantConsoleBuildItem.java:121

        }

        public Builder variables(Map<String, String> variables) {
            this.variables = variables;
            return this;
        }

        public Builder function(Function<Assistant, CompletionStage<?>> function) {
            this.function = Optional.of(function);
            return this;
        }

        public AssistantConsoleBuildItem build() {
            if (key == Character.MIN_VALUE) {
                throw new IllegalStateException(
                        "You have to specify a key. This is the key the user will press to get to your function");
            }
            if (description == null || description.isBlank()) {
                throw new IllegalStateException(
                        "You have to specify a description. This is what the user will see in the console menu");
            }
            if (userMessage == null && !function.isPresent()) {
                throw new IllegalStateException(
                        "You have to specify userMessage that will be send to AI, or implement your own using the function");
            }

            return new AssistantConsoleBuildItem(this);
        }
    }

    public ConsoleCommand getConsoleCommand() {
        return consoleCommand;
    }

    public String getDescription() {
        return consoleCommand != null ? consoleCommand.getDescription() : description;
    }

View on GitHub (pinned to e1c734241f)