{"record":{"id":"8ec632e6fa040dd1","repo":"quarkusio/quarkus","slug":"invoked-method-prop-property-must-not-be-null","errorCode":null,"errorMessage":"<INVOKED_METHOD_PROP> property must not be null","messagePattern":"<INVOKED_METHOD_PROP> property must not be null","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/oidc-client-filter/runtime/src/main/java/io/quarkus/oidc/client/filter/runtime/AbstractOidcClientRequestFilter.java","lineNumber":92,"sourceCode":"    }\n\n    private boolean accessTokenNeedsRefresh() {\n        return refreshOnUnauthorized() && accessTokenNeedsRefresh;\n    }\n\n    private boolean skipPropagation(ClientRequestContext requestContext) {\n        if (getMethodDescription() == null) {\n            return false;\n        }\n\n        return !getMethodDescription().equals(getInvokedRestClientMethodSignature(requestContext));\n    }\n\n    private static MethodDescription getInvokedRestClientMethodSignature(ClientRequestContext requestContext) {\n        if (requestContext.getProperty(INVOKED_METHOD_PROP) instanceof Method method) {\n            return MethodDescription.ofMethod(method);\n        }\n        throw new IllegalStateException(INVOKED_METHOD_PROP + \" property must not be null\");\n    }\n\n    /**\n     * This method is overridden by generated filter classes if the filter should only be applied on the REST client\n     * method.\n     *\n     * @return REST client method description for which this filter should be applied; or null if applies to all methods\n     */\n    protected MethodDescription getMethodDescription() {\n        return null;\n    }\n}\n","sourceCodeStart":74,"sourceCodeEnd":105,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/oidc-client-filter/runtime/src/main/java/io/quarkus/oidc/client/filter/runtime/AbstractOidcClientRequestFilter.java#L74-L105","documentation":"AbstractOidcClientRequestFilter.getInvokedRestClientMethodSignature reads the INVOKED_METHOD_PROP request property, set by the REST client runtime, to learn which REST client method is being invoked. This IllegalStateException means the property was missing, i.e. the filter ran outside the normal REST client invocation context.","triggerScenarios":"A generated/registered OIDC client filter (skipPropagation path) is invoked on a ClientRequestContext that has no INVOKED_METHOD_PROP property — e.g. filter applied to an interface-level invocation, a custom/programmatically registered filter chain that bypasses Quarkus REST client internals, or version mismatch between REST client and filter generator.","commonSituations":"Manually registering the OIDC filter on a plain Jakarta REST client where Quarkus doesn't set the invoked-method property; using an older/newer REST client reactive version incompatible with the filter; combining filters across @RegisterRestClient and manually built proxies.","solutions":["Do not register the Quarkus OIDC client filter manually; rely on Quarkus-generated registration for @RegisterRestClient interfaces","Ensure both quarkus-rest-client and quarkus-oidc-client-filter versions align (same Quarkus BOM)","Skip invocation if requestContext.getProperty(INVOKED_METHOD_PROP) is null in custom filter code","Check that the filter is not being applied to a non-Quarkus REST client"],"exampleFix":"// before\nClientBuilder.newBuilder().register(OidcClientRequestFilter.class)... // property never set\n\n// after\n@RegisterRestClient\npublic interface MyClient { ... } // let Quarkus wire the filter","handlingStrategy":"validation","validationCode":"Object m = requestContext.getProperty(\"org.quarkus.rest.client.invoked-method\");\nif (m == null) { return true; /* skip filter logic */ }","typeGuard":"static boolean hasInvokedMethod(ClientRequestContext ctx) {\n    return ctx.getProperty(AbstractOidcClientRequestFilter.INVOKED_METHOD_PROP) instanceof Method;\n}","tryCatchPattern":"try { return filter.filter(ctx); } catch (IllegalStateException e) { if (e.getMessage().contains(\"property must not be null\")) { log.warn(\"OIDC filter ran outside Quarkus REST client context; skipping\"); return; } throw e; }","preventionTips":["Never register Quarkus-generated OIDC filters manually on plain REST clients","Keep quarkus-rest-client and oidc-client-filter on the same Quarkus version","Guard custom filters against missing request properties"],"tags":["rest-client","filter","oidc"],"backgroundTag":"missing-request-context-property","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"}