Package io.tesler.core.controller
Class GlobalExceptionHandler
- java.lang.Object
-
- io.tesler.core.controller.GlobalExceptionHandler
-
@Order(1) @ControllerAdvice public class GlobalExceptionHandler extends Object
-
-
Constructor Summary
Constructors Constructor Description GlobalExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorResponseDTO
businessException(BusinessException e)
ErrorResponseDTO
businessIntermediateException(Object data, BusinessIntermediateException e)
org.springframework.http.ResponseEntity<String>
clientException(ClientException e)
ErrorResponseDTO
exception(Exception e)
ErrorResponseDTO
unconfirmedException(UnconfirmedException e)
ErrorResponseDTO
versionMismatchException(VersionMismatchException e)
-
-
-
Method Detail
-
exception
@ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public ErrorResponseDTO exception(Exception e)
-
clientException
@ExceptionHandler(ClientException.class) public org.springframework.http.ResponseEntity<String> clientException(ClientException e)
-
businessException
@ExceptionHandler(BusinessException.class) @ResponseStatus(I_AM_A_TEAPOT) @ResponseBody public ErrorResponseDTO businessException(BusinessException e)
-
businessIntermediateException
@ExceptionHandler(BusinessIntermediateException.class) @ResponseStatus(I_AM_A_TEAPOT) @ResponseBody public ErrorResponseDTO businessIntermediateException(Object data, BusinessIntermediateException e)
-
versionMismatchException
@ExceptionHandler(VersionMismatchException.class) @ResponseStatus(CONFLICT) @ResponseBody public ErrorResponseDTO versionMismatchException(VersionMismatchException e)
-
unconfirmedException
@ExceptionHandler(UnconfirmedException.class) @ResponseStatus(NOT_ACCEPTABLE) @ResponseBody public ErrorResponseDTO unconfirmedException(UnconfirmedException e)
-
-