ControllerExceptionHandler

@RestControllerAdvice
class ControllerExceptionHandler(loggingHandler: LoggingHandler)

Constructors

Link copied to clipboard
constructor(loggingHandler: LoggingHandler)

Functions

Link copied to clipboard
@ExceptionHandler(value = [MethodArgumentTypeMismatchException::class, TypeMismatchException::class, WebExchangeBindException::class, BindException::class, MethodArgumentNotValidException::class, DecodingException::class, ConstraintViolationException::class, ServerWebInputException::class, HttpMessageNotReadableException::class])
fun handleBadRequest(ex: Exception, request: HttpServletRequest): ApiResponse<ApiResponse.FailureBody>
@ExceptionHandler(value = [IllegalArgumentException::class])
fun handleBadRequest(ex: IllegalArgumentException, request: HttpServletRequest): ApiResponse<ApiResponse.FailureBody>
Link copied to clipboard
@ExceptionHandler(value = [NoSuchElementException::class])
fun handleForbidden(ex: AccessDeniedException, request: HttpServletRequest): ApiResponse<ApiResponse.FailureBody>
Link copied to clipboard
@ExceptionHandler(value = [IllegalStateException::class])
fun handleIllegalState(ex: Exception, request: HttpServletRequest): ApiResponse<ApiResponse.FailureBody>
Link copied to clipboard
@ExceptionHandler(value = [Exception::class])
fun handleInternalServerError(ex: Exception, request: HttpServletRequest): ApiResponse<ApiResponse.FailureBody>