Direction: Choose the correct option
Q1.
How can you handle exceptions in a REST controller?
Direction: Choose the correct option
Q2.
What does @ExceptionHandler do?
Direction: Choose the correct option
Q3.
What is @ControllerAdvice?
Direction: Choose the correct option
Q4.
How do you return a custom error response?
Direction: Choose the correct option
Q5.
What annotation can be used with @ControllerAdvice to handle REST APIs?
Direction: Choose the correct option
Q6.
What is the purpose of ResponseEntityExceptionHandler?
Direction: Choose the correct option
Q7.
How do you handle validation errors in REST?
Direction: Choose the correct option
Q8.
What HTTP status code is appropriate for resource not found?
Direction: Choose the correct option
Q9.
What status code for validation errors?
Direction: Choose the correct option
Q10.
How do you set HTTP status on an exception class?
