Commit e091d409 authored by 李健华's avatar 李健华

sentry 上报排除一些异常

parent 2cb54fb0
package cn.quantgroup.xyqb.config.sentry;
import cn.quantgroup.xyqb.exception.VerificationCodeErrorException;
import cn.quantgroup.xyqb.exception.*;
import io.sentry.Sentry;
import org.springframework.core.Ordered;
import org.springframework.security.authentication.BadCredentialsException;
......@@ -17,16 +17,15 @@ import javax.servlet.http.HttpServletResponse;
* the actual error.
*/
public class CustomSentryExceptionResolver implements HandlerExceptionResolver, Ordered {
@Override
public ModelAndView resolveException(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex) {
// TODO: 2020/2/4 临时测试,后期修改成通用。
if (ex instanceof VerificationCodeErrorException) {
return null;
}
if (ex instanceof BadCredentialsException) {
if (ex instanceof VerificationCodeErrorException || ex instanceof DataException || ex instanceof UserRegisterLoginException
|| ex instanceof AppletException || ex instanceof AccessForbiddenException || ex instanceof PasswordErrorLimitException || ex instanceof BadCredentialsException) {
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