Commit c4ebf465 authored by xuepeng.chang's avatar xuepeng.chang

参数校验的异常不往sentry报

parent 966569f1
...@@ -7,6 +7,7 @@ import io.sentry.event.interfaces.ExceptionInterface; ...@@ -7,6 +7,7 @@ import io.sentry.event.interfaces.ExceptionInterface;
import org.slf4j.MDC; import org.slf4j.MDC;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.servlet.HandlerExceptionResolver; import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
...@@ -28,7 +29,8 @@ public class CustomSentryExceptionResolver implements HandlerExceptionResolver, ...@@ -28,7 +29,8 @@ public class CustomSentryExceptionResolver implements HandlerExceptionResolver,
Exception ex) { Exception ex) {
// TODO: 2020/2/4 临时测试,后期修改成通用。 // TODO: 2020/2/4 临时测试,后期修改成通用。
if (ex instanceof SilentBizException || ex instanceof VerificationCodeErrorException || ex instanceof DataException || ex instanceof UserRegisterLoginException if (ex instanceof SilentBizException || ex instanceof VerificationCodeErrorException || ex instanceof DataException || ex instanceof UserRegisterLoginException
|| ex instanceof AppletException || ex instanceof AccessForbiddenException || ex instanceof PasswordErrorLimitException || ex instanceof BadCredentialsException) { || ex instanceof AppletException || ex instanceof AccessForbiddenException || ex instanceof PasswordErrorLimitException || ex instanceof BadCredentialsException
|| ex instanceof MethodArgumentNotValidException) {
return null; return null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment