Replies: 2 comments
-
Note that we won't change anything that currently exists in the |
Beta Was this translation helpful? Give feedback.
-
Clearly this did not happen when we transitioned to Jakarta EE. At this point it is a very low priority. In my original comment I did not like creating an exception to pass into another method, which then creates a return JaxrsExceptionMapper.buildResponse(new JaxrsBadRequestException(exception)); and create a new way of building the response without creating another exception, e.g. by simply passing the desired status code along with the original exception: return JaxrsExceptionMapper.buildResponse(400, exception); And of course there can be overloads, e.g. return JaxrsExceptionMapper.buildResponse(Response.Status.BAD_REQUEST, exception); At this point, I think making small improvements is a better use of limited time than some wholesale refactoring or redesign, since we have a lot of production code that already uses the existing design. And while not perfect by any means, it's also not that bad and hasn't caused us any problems in the 7-8 years we've been using it like it currently exists. |
Beta Was this translation helpful? Give feedback.
-
We should not do anything about this now, but I really don't like the way we are constructing an exception class which is then passed as an argument to another method. Whenever JAX-RS finishes the transition to Jakarta RS and all the package names change, we can and should look to re-design everything that is currently in the
org.kiwiproject.jaxrs.exception
package.Originally posted by @sleberknight in kiwiproject/dropwizard-service-utilities#37 (comment)
Beta Was this translation helpful? Give feedback.
All reactions