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

Incorrect status code when WebApplicationException is thrown while parsing @*Param

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.5.5.Final
    • None
    • None
    • None

    Description

      Section 3.2 of the JAX-RS 2.1 Spec reads:

      A WebApplicationException thrown during construction of field or property values using any of the 5 steps listed above is processed directly as described in Section 3.3.4. Other exceptions thrown during construction of field or property values using any of the 5 steps listed above are treated as client errors: if the field or property is annotated with @MatrixParam, @QueryParam or @PathParam then an implementation MUST generate an instance of NotFoundException (404 status) that wraps the thrown exception and no entity; if the field or property is annotated with @HeaderParam or @CookieParam then an implementation MUST generate an instance of BadRequestException (400 status) that wraps the thrown exception and no entity. Exceptions MUST be processed as described in Section 3.3.4.

      https://issues.redhat.com/browse/RESTEASY-1364 addressed an issue about the part that’s after the first sentence. Unfortunately, it broke the first sentence:

      A WebApplicationException thrown during construction of field or property values using any of the 5 steps listed above is processed directly as described in Section 3.3.4.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-asoldano Alessio Soldano
              gurselan Anil Gursel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: