报错信息

This commit is contained in:
2025-11-17 14:31:33 +08:00
parent 9c9d07809a
commit ff4c7c1a35

View File

@@ -125,7 +125,7 @@ public class CzgControllerAdvice {
@ExceptionHandler(MissingServletRequestParameterException.class)
public CzgResult<Object> handleMissingServletRequestParameterException(MissingServletRequestParameterException ex) {
log.error("传参错误:{}", ex.getMessage());
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), "系统繁忙,请稍后再试");
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), "系统异常,请确认参数");
}
/**
@@ -167,7 +167,7 @@ public class CzgControllerAdvice {
// setErrorLog(ex);
// 3. 处理未捕获的异常(系统异常,隐藏敏感信息)
log.error("系统未处理异常", ex);
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), "系统繁忙,请稍后再试");
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), "系统错误,请联系管理员");
}
private void setErrorLog(Exception ex) {