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

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

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.5.5.Final
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  asoldano Alessio Soldano
                  Reporter:
                  gurselan Anil Gursel
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: