{"record":{"id":"573ca9b794e7316f","repo":"OpenFeign/feign","slug":"invalid-status-s-executing-s-s","errorCode":null,"errorMessage":"Invalid status(%s) executing %s %s","messagePattern":"Invalid status\\((.+?)\\) executing (.+?) (.+?)","errorType":"http","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/feign/DefaultClient.java","lineNumber":99,"sourceCode":"      boolean disableRequestBuffering) {\n    super();\n    this.sslContextFactory = sslContextFactory;\n    this.hostnameVerifier = hostnameVerifier;\n    this.disableRequestBuffering = disableRequestBuffering;\n  }\n\n  @Override\n  public Response execute(Request request, Options options) throws IOException {\n    HttpURLConnection connection = convertAndSend(request, options);\n    return convertResponse(connection, request);\n  }\n\n  Response convertResponse(HttpURLConnection connection, Request request) throws IOException {\n    int status = connection.getResponseCode();\n    String reason = connection.getResponseMessage();\n\n    if (status < 0) {\n      throw new IOException(\n          format(\n              \"Invalid status(%s) executing %s %s\",\n              status, connection.getRequestMethod(), connection.getURL()));\n    }\n\n    Map<String, Collection<String>> headers = new TreeMap<>(CASE_INSENSITIVE_ORDER);\n    for (Map.Entry<String, List<String>> field : connection.getHeaderFields().entrySet()) {\n      // response message\n      if (field.getKey() != null) {\n        headers.put(field.getKey(), field.getValue());\n      }\n    }\n\n    Integer length = connection.getContentLength();\n    if (length < 0) {\n      // -1 signals unknown or above Integer.MAX_VALUE; any other negative value is a malformed\n      // header that HttpURLConnection surfaces verbatim\n      length = null;","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/OpenFeign/feign/blob/e2a1e27560a1e68840c34f031afca88b36096e30/core/src/main/java/feign/DefaultClient.java#L81-L117","documentation":"Thrown as an IllegalStateException (Feign's error status decoder) when the HTTP response status code is outside the 200-299 success range configured for the client. It fires in convertResponse after the server replies with an error status (e.g., 404, 500), meaning the request reached the server but was rejected or failed server-side; the placeholders carry the numeric status, the HTTP method, and the request URL.","triggerScenarios":"Thrown at core/src/main/java/feign/DefaultClient.java:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the status code and response body (via an ErrorDecoder) to distinguish client errors (4xx: fix the request URL, headers, or payload) from server errors (5xx: retry or report to the service owner)","Register a custom ErrorDecoder in Feign.builder().errorDecoder(...) to map statuses to domain-specific exceptions instead of the generic message","For retryable server errors, throw a RetryableException from your ErrorDecoder so Feign's Retryer can re-issue the request","Verify the Target URL and path templates are correct if the status is 404/405"],"exampleFix":null,"handlingStrategy":"try-catch","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"}