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

RESTEasy responds with a stack trace for NotFoundException

    XMLWordPrintable

Details

    Description

      Hi,

      I am using RESTeasy as part of a Quarkus application. For the following method:

      @GET
      @Path("{id}")
      public Foo findById(@PathParam("id") ObjectId id) {
        return service.findById(id);
      }
      

      and with this GET request like this: /service/1 - RESTEasy responds with a stack trace like this:

      RESTEASY003870: Unable to extract parameter from http request: javax.ws.rs.PathParam("id") value is '1' for public
      com.example.entity.Foo
      com.example.boundary.Resource.findById(org.bson.types.ObjectId)
      

      I didn't find any possibility to disable the generation of that stack trace in the response. I checked in the Quarkus zulip chat and Sergey Beryozkin suggested to create a ticket here. So can you help me by either guiding me on whether it is possible to never let RESTEasy put any stack traces in a response? As far as I understand it would only be possible to implement a generic ExceptionMapper which would then need to handle all the cases which are actually handled fine by the default implementation. I only want to get rid of that stack trace (disabling to respond with the RESTEASY error code would be nice as well).

       

      Thanks

      Dirk

       

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              dpapenberg Dirk Papenberg (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: