Complete core functions #9
@@ -9,6 +9,7 @@ import org.springframework.http.converter.HttpMessageNotReadableException
|
||||
import org.springframework.security.authentication.BadCredentialsException
|
||||
import org.springframework.security.authentication.InsufficientAuthenticationException
|
||||
import org.springframework.security.authentication.InternalAuthenticationServiceException
|
||||
import org.springframework.web.HttpRequestMethodNotSupportedException
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice
|
||||
@@ -28,6 +29,11 @@ class ExceptionHandler {
|
||||
ResponseResult.fail(ResponseCode.SYSTEM_UNAUTHORIZED, e.localizedMessage, null)
|
||||
}
|
||||
|
||||
is HttpRequestMethodNotSupportedException -> {
|
||||
logger.debug(e.localizedMessage, e)
|
||||
ResponseResult.fail(ResponseCode.SYSTEM_REQUEST_ILLEGAL, e.localizedMessage, null)
|
||||
}
|
||||
|
||||
is HttpMessageNotReadableException -> {
|
||||
logger.debug(e.localizedMessage, e)
|
||||
ResponseResult.fail(ResponseCode.SYSTEM_REQUEST_ILLEGAL, e.localizedMessage.split(":")[0], null)
|
||||
|
||||
Reference in New Issue
Block a user