Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-2978

ExceptionMapper<WebApplicationException> is not working in DEV mode

    XMLWordPrintable

Details

    Description

      When users define a list of custom exception mappers, it should be possible to match an incoming exception to one of the custom mapper.

      The behavior should be the same in DEV, JVM and native modes.

      For instance, when users define below list of custom exception mappers:

      @Provider
      public class CustomExceptionMapper1 implements ExceptionMapper<BadRequestException> {
          @Override
          public Response toResponse(BadRequestException t) {
              return ...
          }
      }
      
      @Provider
      public class CustomExceptionMapper2 implements ExceptionMapper<Exception> {
          @Override
          public Response toResponse(Exception t) {
              return ...
          }
      }
      

      Then, generating a not found exception:

      curl -X POST http://localhost:8080/hellow?myparam=value1
      

      The expectation is that method CustomExceptionMapper2.toResponse should be called in DEV mode, JVM mode and native mode.

      Attachments

        Activity

          People

            gandrian Georgios Andrianakis
            rhagallice Alexandre Gallice
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: