{"record":{"id":"cf6515c0c26ec3f9","repo":"OpenFeign/feign","slug":"configkey-is-not-a-method-handled-by-feign","errorCode":null,"errorMessage":"${configKey} is not a method handled by feign","messagePattern":"(.+?) is not a method handled by feign","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/feign/ReflectiveFeign.java","lineNumber":223,"sourceCode":"    private static boolean isMoreSpecific(Method candidate, Method current) {\n      Class<?>[] candidateParams = candidate.getParameterTypes();\n      Class<?>[] currentParams = current.getParameterTypes();\n      for (int i = 0; i < candidateParams.length; i++) {\n        if (candidateParams[i] != currentParams[i]\n            && currentParams[i].isAssignableFrom(candidateParams[i])) {\n          return true;\n        }\n      }\n      Class<?> candidateReturn = candidate.getReturnType();\n      Class<?> currentReturn = current.getReturnType();\n      return candidateReturn != currentReturn && currentReturn.isAssignableFrom(candidateReturn);\n    }\n\n    private MethodHandler createMethodHandler(\n        final Target<?> target, final MethodMetadata md, final C requestContext) {\n      if (md.isIgnored()) {\n        return args -> {\n          throw new IllegalStateException(md.configKey() + \" is not a method handled by feign\");\n        };\n      }\n\n      return factory.create(target, md, requestContext);\n    }\n  }\n\n  private static class TargetSpecificationVerifier {\n    public static <T> void verify(Target<T> target) {\n      Class<T> type = target.type();\n      if (!type.isInterface()) {\n        throw new IllegalArgumentException(\"Type must be an interface: \" + type);\n      }\n\n      for (final Method m : type.getMethods()) {\n        final Class<?> retType = m.getReturnType();\n\n        if (!CompletableFuture.class.isAssignableFrom(retType)) {","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/OpenFeign/feign/blob/e2a1e27560a1e68840c34f031afca88b36096e30/core/src/main/java/feign/ReflectiveFeign.java#L205-L241","documentation":"A generic guard inside createMethodHandler: when the MethodMetadata for a method is flagged isIgnored, Feign installs a handler that always throws this IllegalStateException. It fires at invocation time if application code calls an interface method that Feign deliberately excludes from handling (via ignoreMethods/ignored method configuration), meaning the proxy cannot produce a request for it.","triggerScenarios":"Thrown at core/src/main/java/feign/ReflectiveFeign.java:223 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the method from Feign's ignored-methods configuration so it gets a real handler","Change client code to not call that method through the Feign proxy","If the method should not be remote, implement it locally (default method or separate class)","Confirm the configKey in the error matches the method you intended to configure"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e2a1e27560a1e68840c34f031afca88b36096e30","analyzedAt":"2026-09-10T12:37:37.238Z","contentChangedAt":"2026-09-10T12:37:37.238Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}