Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-614

ClientResponseException not thrown for invocations of method with Response as return type for http status codes > 399

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • 2.3-RC1
    • 2.2.1
    • None
    • None

      The anonymous implementation of

      EntityExtractor at line 22 of DefaultEntityExtractorFactory
       public static final EntityExtractor clientResponseExtractor = new EntityExtractor<ClientResponse>()
         {
            public ClientResponse extractEntity(ClientRequestContext context, Object... args)
            {
               return context.getClientResponse();
            }
         };
      

      does not check for status code violations as for example is done in

      BaseClientResponse at line 469
      public void checkFailureStatus()
         {
            if (status > 399 && status < 599)
            {
               throw createResponseFailure(format("Error status %d %s returned", status, getResponseStatus()));
            }
         }
      

      this flow of execution happens for methods returning javax.ws.rs.Response throwing an WebApplicationException with for example a http status code 400

              patriot1burke@gmail.com Bill Burke (Inactive)
              frko_jira Frank Kootte (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: