We are currently wrapping many errors in RuntimeException see for example
This is mostly due to quick early implementation that was left in the source code and copy-paste elsewhere.
The general constraints are that we are trying to reuse as many interface as possible from the Spring framework and specifically Spring Data to make our architecture and behaviors consistent. Spring Data (see https://github.com/DSpace/DSpace/blob/238ede5f9d8cba33f0548acebf76ae79dabc3cfb/dspace-spring-rest/src/main/java/org/dspace/app/rest/repository/DSpaceRestRepository.java#L42) constraints us to catch SQLException in a runtime exception but of course we can use more specialized exception such as
This task is about refactor the current code replacing generic RuntimeException with more specialized exception from Spring if possible
or creating our own exception as done for instance for the auth exception