Robust and consistent error handling is key when working with any kind of software framework. While Spring itself generally is doing a pretty decent job at that, when it comes to providing REST APIs with Spring Boot the framework is rather lacking.
To provide a more consistent error handling experience with Spring Boot REST APIs, Wim Deblauwe (of Taming Thymeleaf fame has release an Error Handling Spring Boot Starter, which enforces robust error handling across a Spring Boot application.
See his article on Better Error Handling for Your Spring Boot REST APIs for more details and a guide on how to get started with this useful Spring Boot starter.