You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we are doing this shenanigans for Spring classes, then we probably should also do it for Hibernate, especially since we removed Spring from most services that are using Hibernate and are just using Dropwizard's native Hibernate support.
However, I suggest adding a new issue to add this functionality instead of doing it here.
* Handle Hibernate OptimisticEntityLockException and
ConstraintViolationException classes
* Refactor internal logic to use a map from class name to a category
which is then used to select the appropriate response status code.
The only annoying thing is that we don't yet have Java's new
exhaustive compiler check on the switch, so the default arm cannot
be covered with tests.
* Refactor LoggingExceptionMapperTest to use the actual Spring and
Hibernate classes, which allowed us to change the
dataAccessExceptionResponse method to be private
* Add the Spring and Hibernate dependencies with test scope
Closes#48
…per (#79)
* Handle select Hibernate data exception classes in LoggingExceptionMapper
* Handle Hibernate OptimisticEntityLockException and
ConstraintViolationException classes
* Refactor internal logic to use a map from class name to a category
which is then used to select the appropriate response status code.
The only annoying thing is that we don't yet have Java's new
exhaustive compiler check on the switch, so the default arm cannot
be covered with tests.
* Refactor LoggingExceptionMapperTest to use the actual Spring and
Hibernate classes, which allowed us to change the
dataAccessExceptionResponse method to be private
* Add the Spring and Hibernate dependencies with test scope
Closes#48
If we are doing this shenanigans for Spring classes, then we probably should also do it for Hibernate, especially since we removed Spring from most services that are using Hibernate and are just using Dropwizard's native Hibernate support.
However, I suggest adding a new issue to add this functionality instead of doing it here.
Originally posted by @sleberknight in #37 (comment)
The text was updated successfully, but these errors were encountered: