Package com.levanquy.exception
Class GlobalExceptionHandler
java.lang.Object
com.levanquy.exception.GlobalExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<ErrorMessage> handleValidationExceptions(org.springframework.web.bind.MethodArgumentNotValidException ex)
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
handleBadRequestException
@ExceptionHandler(BadRequestException.class) @ResponseStatus(BAD_REQUEST) public org.springframework.http.ResponseEntity<Map<String,String>> handleBadRequestException(HttpExceptions.BadRequestException ex) -
handleUnauthorizedException
@ExceptionHandler(UnauthorizedException.class) @ResponseStatus(UNAUTHORIZED) public org.springframework.http.ResponseEntity<Map<String,String>> handleUnauthorizedException(HttpExceptions.UnauthorizedException ex) -
handleForbiddenException
@ExceptionHandler(ForbiddenException.class) @ResponseStatus(FORBIDDEN) public org.springframework.http.ResponseEntity<Map<String,String>> handleForbiddenException(HttpExceptions.ForbiddenException ex) -
handleNotFoundException
@ExceptionHandler(NotFoundException.class) @ResponseStatus(NOT_FOUND) public org.springframework.http.ResponseEntity<Map<String,String>> handleNotFoundException(HttpExceptions.NotFoundException ex) -
handleMethodNotAllowedException
@ExceptionHandler(MethodNotAllowedException.class) @ResponseStatus(METHOD_NOT_ALLOWED) public org.springframework.http.ResponseEntity<Map<String,String>> handleMethodNotAllowedException(HttpExceptions.MethodNotAllowedException ex) -
handleRequestTimeoutException
@ExceptionHandler(RequestTimeoutException.class) @ResponseStatus(REQUEST_TIMEOUT) public org.springframework.http.ResponseEntity<Map<String,String>> handleRequestTimeoutException(HttpExceptions.RequestTimeoutException ex) -
handleInternalServerErrorException
@ExceptionHandler(InternalServerErrorException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public org.springframework.http.ResponseEntity<Map<String,String>> handleInternalServerErrorException(HttpExceptions.InternalServerErrorException ex) -
handleNullPointerException
@ExceptionHandler(NullPointerException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public org.springframework.http.ResponseEntity<Map<String,String>> handleNullPointerException(HttpExceptions.NullPointerException ex) -
handleIllegalArgumentException
@ExceptionHandler(IllegalArgumentException.class) @ResponseStatus(BAD_REQUEST) public org.springframework.http.ResponseEntity<Map<String,String>> handleIllegalArgumentException(HttpExceptions.IllegalArgumentException ex) -
handleValidationExceptions
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<ErrorMessage> handleValidationExceptions(org.springframework.web.bind.MethodArgumentNotValidException ex)
-