1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 23:11:24 +08:00

Fixed can not search [] bug

This commit is contained in:
2023-06-04 03:15:00 +08:00
parent 1b95406348
commit 0c01b42b8c
3 changed files with 26 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import com.cfive.pinnacle.exception.TokenHasExpiredException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.jdbc.UncategorizedSQLException;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.DisabledException;
@@ -49,6 +50,9 @@ public class CustomExceptionHandler {
if (e instanceof DataValidationFailedException) {
return ResponseResult.build(ResponseCode.DATABASE_DATA_VALIDATION_FAILED, e.getMessage(), null);
}
if (e instanceof UncategorizedSQLException) {
return ResponseResult.build(ResponseCode.DATABASE_EXECUTE_ERROR, "error", null);
}
log.debug(e.getMessage(), e);