quarkusio/quarkus · error · IllegalStateException

Registry '${registryId}' config option '${offering}' must no

Error message

Registry '${registryId}' config option '${offering}' must not be empty

What it means

This error is thrown by RegistriesConfigLocator.validate() when a registry entry in the Quarkus extension registry config YAML defines the 'offering' extra option but gives it no value (null key present or a blank string). The 'offering' option selects which platform offering (e.g. 'redhat', 'pvre') to use for a registry, and an empty value is considered a configuration error rather than being silently ignored.

Source

Thrown at independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/config/RegistriesConfigLocator.java:113

     * @param configYaml reader
     * @return deserialized registry client configuration
     */
    public static RegistriesConfig load(Reader configYaml) {
        try {
            RegistriesConfigImpl.Builder instance = RegistriesConfigMapperHelper.deserializeYaml(configYaml,
                    RegistriesConfigImpl.Builder.class);
            return instance == null ? null : validate(instance.build());
        } catch (IOException e) {
            throw new IllegalStateException("Failed to parse config file " + configYaml, e);
        }
    }

    private static RegistriesConfig validate(RegistriesConfig config) {
        for (RegistryConfig registry : config.getRegistries()) {
            Object offering = registry.getExtra().get(Constants.OFFERING);
            if (offering == null && registry.getExtra().containsKey(Constants.OFFERING)
                    || offering instanceof String offeringValue && offeringValue.isBlank()) {
                throw new IllegalStateException(
                        "Registry '" + registry.getId() + "' config option '" + Constants.OFFERING
                                + "' must not be empty");
            }
        }
        return config;
    }

    /**
     * Returns the registry client configuration file or null, if the file could not be found.
     *
     * @return the registry client configuration file or null, if the file could not be found
     */
    public static Path locateConfigYaml() {
        return locateConfigYaml(null);
    }

    /**
     * Returns the registry client configuration file or null if the file could not be found.

View on GitHub (pinned to e1c734241f)

Solutions

  1. Open the registry config file (default ~/.quarkus/config.yaml or the file named by quarkus.registries) and set a non-empty value for the registry's extra.offering (e.g. `offering: redhat`), or delete the empty `offering` key entirely if you want the default platform
  2. Verify the YAML indentation so the `offering` key sits under the registry's `extra:` map, not elsewhere
  3. If a script/tool generates the config, fix it to omit the key instead of writing an empty value

Example fix

// before (registries.yaml)
registries:
  - registry.quarkus.io:
      extra:
        offering: ""
// after
registries:
  - registry.quarkus.io:
      extra:
        offering: redhat
Defensive patterns

Strategy: validation

Validate before calling

Path cfg = Path.of(System.getProperty("user.home"), ".quarkus", "config.yaml");
if (Files.exists(cfg)) {
    String yaml = Files.readString(cfg);
    if (yaml.matches("(?s).*offering:\\s*(|''|\"\").*")) {
        throw new IllegalStateException("Empty 'offering' value in " + cfg);
    }
}

Prevention

When it happens

Trigger: The registries.yaml config contains a registry entry whose extra map has an 'offering' key set to null or to a whitespace-only string (e.g. `extra: offering: ""`). validate() is invoked by every load() of the config.

Common situations: Hand-editing ~/.quarkus/config.yaml and leaving `offering:` with no value; tooling writing an empty offering placeholder; migrating configs between plain Quarkus and Red Hat build of Quarkus where the offering key was added but not populated.

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


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