{"record":{"id":"cba41e6c16d878c4","repo":"OpenFeign/feign","slug":"requestline-annotation-didn-t-start-with-an-http-v","errorCode":null,"errorMessage":"RequestLine annotation didn't start with an HTTP verb on method %s","messagePattern":"RequestLine annotation didn't start with an HTTP verb on method (.+?)","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/feign/DefaultContract.java","lineNumber":59,"sourceCode":"              \"Headers annotation was empty on type %s.\",\n              data.configKey());\n          final Map<String, Collection<String>> headers = toMap(headersOnType);\n          headers.putAll(data.template().headers());\n          data.template().headers(null); // to clear\n          data.template().headers(headers);\n        });\n    super.registerMethodAnnotation(\n        RequestLine.class,\n        (ann, data) -> {\n          final String requestLine = ann.value();\n          checkState(\n              emptyToNull(requestLine) != null,\n              \"RequestLine annotation was empty on method %s.\",\n              data.configKey());\n\n          final Matcher requestLineMatcher = REQUEST_LINE_PATTERN.matcher(requestLine);\n          if (!requestLineMatcher.find()) {\n            throw new IllegalStateException(\n                String.format(\n                    \"RequestLine annotation didn't start with an HTTP verb on method %s\",\n                    data.configKey()));\n          } else {\n            data.template().method(HttpMethod.valueOf(requestLineMatcher.group(1)));\n            data.template().uri(requestLineMatcher.group(2));\n          }\n          data.template().decodeSlash(ann.decodeSlash());\n          data.template().collectionFormat(ann.collectionFormat());\n        });\n    super.registerMethodAnnotation(\n        Body.class,\n        (ann, data) -> {\n          final String body = ann.value();\n          checkState(\n              emptyToNull(body) != null,\n              \"Body annotation was empty on method %s.\",\n              data.configKey());","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/OpenFeign/feign/blob/e2a1e27560a1e68840c34f031afca88b36096e30/core/src/main/java/feign/DefaultContract.java#L41-L77","documentation":"Thrown from DefaultContract's RequestLine annotation processing when the @RequestLine value does not begin with a recognized HTTP verb (e.g., it starts with a path like \"/items/{id}\" instead of \"GET /items/{id}\"). The contract parses the verb from the first token of the annotation value, so any missing or malformed method prefix fails this guard during interface parsing at client creation time.","triggerScenarios":"Thrown at core/src/main/java/feign/DefaultContract.java:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Format the annotation as 'VERB /path', e.g. @RequestLine(\"GET /items/{id}\")","Use a valid HTTP verb (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS) as the first whitespace-delimited token","If using a custom contract or non-standard verb, switch to a Contract implementation that supports it or implement your own Contract"],"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"}