{"record":{"id":"0d32c3fa20237649","repo":"quarkusio/quarkus","slug":"registry-registryid-config-option-offering","errorCode":null,"errorMessage":"Registry '${registryId}' config option '${offering}' must not be empty","messagePattern":"Registry '(.+?)' config option '(.+?)' must not be empty","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/config/RegistriesConfigLocator.java","lineNumber":113,"sourceCode":"     * @param configYaml reader\n     * @return deserialized registry client configuration\n     */\n    public static RegistriesConfig load(Reader configYaml) {\n        try {\n            RegistriesConfigImpl.Builder instance = RegistriesConfigMapperHelper.deserializeYaml(configYaml,\n                    RegistriesConfigImpl.Builder.class);\n            return instance == null ? null : validate(instance.build());\n        } catch (IOException e) {\n            throw new IllegalStateException(\"Failed to parse config file \" + configYaml, e);\n        }\n    }\n\n    private static RegistriesConfig validate(RegistriesConfig config) {\n        for (RegistryConfig registry : config.getRegistries()) {\n            Object offering = registry.getExtra().get(Constants.OFFERING);\n            if (offering == null && registry.getExtra().containsKey(Constants.OFFERING)\n                    || offering instanceof String offeringValue && offeringValue.isBlank()) {\n                throw new IllegalStateException(\n                        \"Registry '\" + registry.getId() + \"' config option '\" + Constants.OFFERING\n                                + \"' must not be empty\");\n            }\n        }\n        return config;\n    }\n\n    /**\n     * Returns the registry client configuration file or null, if the file could not be found.\n     *\n     * @return the registry client configuration file or null, if the file could not be found\n     */\n    public static Path locateConfigYaml() {\n        return locateConfigYaml(null);\n    }\n\n    /**\n     * Returns the registry client configuration file or null if the file could not be found.","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/config/RegistriesConfigLocator.java#L95-L131","documentation":"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.","triggerScenarios":"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:\n  offering: \"\"`). validate() is invoked by every load() of the config.","commonSituations":"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.","solutions":["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","Verify the YAML indentation so the `offering` key sits under the registry's `extra:` map, not elsewhere","If a script/tool generates the config, fix it to omit the key instead of writing an empty value"],"exampleFix":"// before (registries.yaml)\nregistries:\n  - registry.quarkus.io:\n      extra:\n        offering: \"\"\n// after\nregistries:\n  - registry.quarkus.io:\n      extra:\n        offering: redhat","handlingStrategy":"validation","validationCode":"Path cfg = Path.of(System.getProperty(\"user.home\"), \".quarkus\", \"config.yaml\");\nif (Files.exists(cfg)) {\n    String yaml = Files.readString(cfg);\n    if (yaml.matches(\"(?s).*offering:\\\\s*(|''|\\\"\\\").*\")) {\n        throw new IllegalStateException(\"Empty 'offering' value in \" + cfg);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never leave a YAML key with an empty value; omit the key or set a valid offering name","Validate registries.yaml in CI with a schema check before builds that resolve extensions","Keep registry config under version control or template-generated with non-empty defaults"],"tags":["config","yaml","registry","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}