An exception signals an abnormal condition during execution. In a REST endpoint, you can handle it in the controller action or separate its handling from that action. section 10.6
Choose where to handle an exception:
- Handle it in the controller action when the handling belongs there; this couples the logic to that action and can lead to duplication. section 10.6
- Use a REST controller advice class to separate exception handling from the action. section 10.6




























