Consider adding DataAccessExceptionMapper to kiwi #682
Replies: 2 comments 1 reply
-
Instead of using "instance of" checking, we could simply have a list of the FQCN for data access violation classes in various frameworks and libraries. We get the class name and compare against the ones we support. That way we could easily support the optimistic locking violations for the Spring, Hibernate, Spring Data, and whatever other libraries like JDBI which have their own exceptions. |
Beta Was this translation helpful? Give feedback.
-
The Spring Because there are so many |
Beta Was this translation helpful? Give feedback.
-
I found this in one of our services (not including imports):
Things to note/consider:
org.springframework.dao
package, so might want to rename it something likeSpringDataAccessExceptionMapper
? (though, see question below about one versus many mappers)ExceptionMapper
has a type parameter which is used by Jersey/JAX-RS/Jakarta EE to figure out which mapper to apply.ExceptionMapper
or separate them?Beta Was this translation helpful? Give feedback.
All reactions