{"record":{"id":"97a06eb9e0593b82","repo":"quarkusio/quarkus","slug":"proxy-configuration-with-name-key-was-requested","errorCode":null,"errorMessage":"Proxy configuration with name ${key} was requested but quarkus.proxy.\"${key}\".host is not defined","messagePattern":"Proxy configuration with name (.+?) was requested but quarkus\\.proxy\\.\"(.+?)\"\\.host is not defined","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/proxy-registry/runtime/src/main/java/io/quarkus/proxy/runtime/ProxyConfigurationRegistryImpl.java","lineNumber":32,"sourceCode":"    ProxyConfigurationRegistryImpl(Map<String, ProxyConfiguration> configs, Optional<ProxyConfiguration> defaultConfig) {\n        this.configs = configs;\n        this.defaultConfig = defaultConfig;\n    }\n\n    @Override\n    public Optional<ProxyConfiguration> get(Optional<String> name) {\n        if (name.isEmpty()) {\n            return defaultConfig;\n        }\n\n        String key = name.get();\n        if (ProxyConfigurationRegistry.NONE.equals(key)) {\n            return NONE;\n        }\n\n        ProxyConfiguration config = configs.get(key);\n        if (config == null) {\n            throw new IllegalStateException(\"Proxy configuration with name \" + key + \" was requested but \"\n                    + \"quarkus.proxy.\\\"\" + key + \"\\\".host is not defined\");\n        }\n        return Optional.of(config);\n    }\n\n    private static final Optional<ProxyConfiguration> NONE = Optional.of(new ProxyConfigurationImpl(\"none\", 0,\n            Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), ProxyType.HTTP));\n}\n","sourceCodeStart":14,"sourceCodeEnd":41,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/proxy-registry/runtime/src/main/java/io/quarkus/proxy/runtime/ProxyConfigurationRegistryImpl.java#L14-L41","documentation":"Thrown at runtime (during a public get() call on ProxyConfigurationRegistryImpl) when code requests a named proxy configuration whose key was never registered because quarkus.proxy.\"<key>\".host was not set. The registry only builds configurations for named proxies that define a host, so any lookup of an undefined name fails with this message. The special key \"none\" always returns an empty/none configuration instead of throwing.","triggerScenarios":"Any runtime code path calling ProxyConfigurationRegistry.get(key) (e.g. an HTTP client proxy lookup, or Quarkus internals resolving a configured proxy name) where no quarkus.proxy.\"<key>\".host property exists in the application configuration.","commonSituations":"A library or application property points to a proxy by name but the corresponding quarkus.proxy.\"<name>\".host entry was never added; the proxy block was removed or renamed while referencing code/config still uses the old key; typos in the key between the reference and the definition; config only defined for another profile.","solutions":["Define the proxy: add quarkus.proxy.\"<key>\".host (and port) in application.properties for the active profile.","Fix the key used in the referencing configuration or code so it matches an existing quarkus.proxy.\"<name>\" entry exactly (quotes/case matter).","If you removed the proxy intentionally, update or remove whatever references it by name (e.g. HTTP client proxy-name settings).","Check the property is not scoped to a profile that isn't active (e.g. defined only under %dev)."],"exampleFix":"// before (application.properties) — referenced but never defined\nquarkus.http.proxy-name=\"corp\"\n\n// after — define the named proxy\nquarkus.proxy.\"corp\".host=proxy.corp.example\nquarkus.proxy.\"corp\".port=8080\nquarkus.http.proxy-name=\"corp\"","handlingStrategy":"validation","validationCode":"// Check the named proxy is defined before requesting it from the registry\nString key = \"corp\";\nboolean defined = ConfigProvider.getConfig()\n    .getOptionalValue(\"quarkus.proxy.\\\"\" + key + \"\\\".host\", String.class)\n    .isPresent();\nif (!defined) {\n    throw new IllegalStateException(\n        \"quarkus.proxy.\\\"\" + key + \"\\\".host must be defined before lookup\");\n}\nOptional<ProxyConfiguration> cfg = registry.get(key);","typeGuard":null,"tryCatchPattern":"// The registry throws IllegalStateException on unknown keys\ntry {\n    Optional<ProxyConfiguration> cfg = registry.get(key);\n    cfg.ifPresent(this::configureClient);\n} catch (IllegalStateException e) {\n    log.warnf(\"Proxy '%s' is not configured (quarkus.proxy.\\\"%s\\\".host missing): %s\", key, key, e.getMessage());\n    // fall back to no proxy or abort startup, per policy\n}","preventionTips":["Define quarkus.proxy.\"<name>\".host for every proxy name referenced anywhere in your configuration.","Centralize proxy names as constants and reference the same key in code and properties.","When removing a proxy, grep for the name across properties, yaml, and code references.","Verify the property exists in the active profile's configuration before enabling features that depend on it."],"tags":["quarkus","runtime","configuration","proxy","missing-config"],"backgroundTag":"missing-config-property","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}