How to Return a Custom Error Message for Invalid Enum Value in Spring Boot RequestBody?
My put endpoint accept a requestBody of type UpdateUserDTO. The role property must be of type roleEnum.
I am looking for a way to return a custom message if the role property provided is not a roleEnum.