So I have various API endpoints defined in my Spring Boot
services that throws various custom exceptions. But I am not able to make a distinction between Checked and Unchecked exceptions.
So should my custom exception be Checked or Unchecked exception?
Examples:
- UserNotFoundException
- EmailAlreadyExistsException
- JWTTokenMalformedException
- DatabaseNodeFailureException
These exceptions are parsed by Spring ControllerAdvice
, converted to ResponseEntity and sent to client.
How would you define above custom created exceptions as Checked or Unchecked? Also let me know if there is any thumb rule to decide if your exception should be Checked or Unchecked?