{"record":{"id":"43159064269d347c","repo":"quarkusio/quarkus","slug":"we-didn-t-found-any-httpfunction-to-run-or-there","errorCode":null,"errorMessage":"We didn't found any HttpFunction to run (or there is multiple one and none selected inside your application.properties)","messagePattern":"We didn't found any HttpFunction to run \\(or there is multiple one and none selected inside your application\\.properties\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusHttpFunction.java","lineNumber":76,"sourceCode":"                throw new RuntimeException(e);\n            }\n        }\n    }\n\n    static void clearState() {\n        delegate = null;\n        delegateClassLoader = null;\n    }\n\n    @Override\n    public void service(HttpRequest httpRequest, HttpResponse httpResponse) throws Exception {\n        if (!started) {\n            throw new IOException(deploymentStatus);\n        }\n\n        // maybe we can check this at static init\n        if (delegate == null) {\n            throw new IOException(\"We didn't found any HttpFunction to run \" +\n                    \"(or there is multiple one and none selected inside your application.properties)\");\n        }\n\n        ClassLoader currentCl = Thread.currentThread().getContextClassLoader();\n        try {\n            Thread.currentThread().setContextClassLoader(delegateClassLoader);\n            delegate.service(httpRequest, httpResponse);\n        } finally {\n            Thread.currentThread().setContextClassLoader(currentCl);\n        }\n    }\n}\n","sourceCodeStart":58,"sourceCodeEnd":89,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusHttpFunction.java#L58-L89","documentation":"QuarkusHttpFunction.service throws this when the Quarkus app started but no HttpFunction delegate was bound. The delegate is resolved at startup from CDI beans implementing HttpFunction; it is null when none exist or when multiple exist without an explicit selection.","triggerScenarios":"An HTTP request hits the function while the application has zero HttpFunction beans, or has several and none was selected via the configuration property.","commonSituations":"Adding a second HttpFunction implementation without selecting one, deleting/renaming the implementation, or the implementing class not being a CDI-discoverable bean.","solutions":["Provide exactly one HttpFunction bean, or","With multiple implementations, set quarkus.google-cloud-functions.function=<FQCN> in application.properties","Annotate/implement the class so it is registered as an unremovable CDI bean"],"exampleFix":"# before\n# (two HttpFunction impls, no selection)\n# after\nquarkus.google-cloud-functions.function=com.example.MyHttpFunction","handlingStrategy":"validation","validationCode":"long count = Arc.container().select(HttpFunction.class).count();\nString selected = config.getValue(\"quarkus.google-cloud-functions.function\", String.class);\nif (count == 0 || (count > 1 && selected == null)) {\n    throw new IllegalStateException(\"HttpFunction delegate not uniquely selected\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    function.service(request, response);\n} catch (IOException e) {\n    if (e.getMessage().contains(\"didn't found any HttpFunction\")) {\n        throw new IllegalStateException(\"Set quarkus.google-cloud-functions.function or keep a single HttpFunction bean\");\n    }\n    throw e;\n}","preventionTips":["One HttpFunction implementation per deployment; otherwise set the selection property","Add a CDI test asserting the HttpFunction bean resolves","Review the property when adding new function classes","Watch startup logs for delegate-binding messages"],"tags":["gcp","configuration","http-function","missing-bean"],"backgroundTag":"missing-function-delegate","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"}