HTTP Error Responses
Learn HTTP Error Responses (Exception Handling, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes HTTP error responses tell the client a request failed: 4xx means the client made a mistake, 5xx means the server failed. Common codes : 400 bad request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 422 unprocessable, 500 server error. Ways to set them : @ResponseStatus , ResponseEntity , ResponseStatusException or an exception handler.