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

Details

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

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: