{"record":{"id":"bb0d69488cc29175","repo":"quarkusio/quarkus","slug":"cannot-discover-value-of-routeconfigkey-as-no-ex","errorCode":null,"errorMessage":"Cannot discover value of <routeConfigKey> as no explicit path was specified and a route function is in use","messagePattern":"Cannot discover value of <routeConfigKey> as no explicit path was specified and a route function is in use","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/RouteBuildItem.java","lineNumber":266,"sourceCode":"        private boolean shouldInclude(String managementConfigKey) {\n            Config config = ConfigProvider.getConfig();\n            return config.getValue(managementConfigKey, boolean.class);\n        }\n\n        public RouteBuildItem build() {\n            if (routeFunction == null) {\n                throw new IllegalStateException(\n                        \"'RouteBuildItem$Builder.routeFunction' was not set. Ensure that one of the builder methods that result in it being set is called\");\n            }\n            return new RouteBuildItem(this, APPLICATION_ROUTE, APPLICATION_ROUTE, isManagement);\n        }\n\n        protected ConfiguredPathInfo getRouteConfigInfo() {\n            if (routeConfigKey == null) {\n                return null;\n            }\n            if (routePath == null) {\n                throw new RuntimeException(\"Cannot discover value of \" + routeConfigKey\n                        + \" as no explicit path was specified and a route function is in use\");\n            }\n            if (absolutePath != null) {\n                return new ConfiguredPathInfo(routeConfigKey, absolutePath, true, isManagement);\n            }\n            return new ConfiguredPathInfo(routeConfigKey, routePath, false, isManagement);\n        }\n\n        protected NotFoundPageDisplayableEndpointBuildItem getNotFoundEndpoint() {\n            if (!displayOnNotFoundPage) {\n                return null;\n            }\n            if (notFoundPagePath == null) {\n                throw new RuntimeException(\"Cannot display \" + routeFunction\n                        + \" on not found page as no explicit path was specified and a route function is in use\");\n            }\n            if (absolutePath != null) {\n                return new NotFoundPageDisplayableEndpointBuildItem(absolutePath, notFoundPageTitle, true);","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/RouteBuildItem.java#L248-L284","documentation":"getRouteConfigInfo resolves the final configured path for a route keyed by routeConfigKey (e.g. quarkus.http.non-application-root-path entries). If the builder only has a route function and no explicit routePath, there is nothing to report for that config key, so it throws instead of returning a misleading ConfiguredPathInfo. This happens during deployment when other parts of the build need to know where a route ended up.","triggerScenarios":"Building a RouteBuildItem with routeConfigKey set (or a path-backed route query) but registering the handler via a route function without routePath/notFoundPagePath, then getRouteConfigInfo() is invoked by the VertxHttpProcessor during aggregation.","commonSituations":"Extension authors setting a config key expecting Quarkus to derive the path, but registering via routeFunction(Consumer) overload; renaming path config properties so routePath no longer gets populated.","solutions":["Set an explicit path (route(String configKey, String path) or routeFunction(String path, Consumer<Route>)) so the config key has a resolvable value","Drop the routeConfigKey if the route truly has no configurable path","Verify the builder method used populates routePath: path-based overloads do, Consumer-only chain does not"],"exampleFix":"// before\nnew RouteBuildItem.Builder().routeFunction(\"/q/foo\", r -> r.handler(h))\n    .routeConfigKey(\"quarkus.smallrye-graphql.root-path\");\n// after\nnew RouteBuildItem.Builder().route(\"quarkus.smallrye-graphql.root-path\", \"/graphql\")\n    .routeFunction(r -> r.handler(h));","handlingStrategy":"validation","validationCode":"if (configKey != null) {\n    if (routePath == null) {\n        throw new IllegalArgumentException(\"routeConfigKey \" + configKey + \" requires an explicit path\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When setting routeConfigKey, always use the path-based builder overloads so routePath is populated","Never mix routeFunction(Consumer) registration with a routeConfigKey","Test extensions that declare config keys by asserting ConfiguredPathInfo is non-null in a build-step test"],"tags":["quarkus","vertx-http","config-key","routing","build-time"],"backgroundTag":"missing-explicit-path","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"}