|
@@ -2,6 +2,7 @@ package com.citu.framework.web.core.handler;
|
|
|
|
|
|
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.citu.framework.apilog.core.service.ApiErrorLogFrameworkService;
|
|
import com.citu.framework.apilog.core.service.ApiErrorLogFrameworkService;
|
|
|
import com.citu.framework.common.exception.ErrorCode;
|
|
import com.citu.framework.common.exception.ErrorCode;
|
|
@@ -300,6 +301,9 @@ public class GlobalExceptionHandler {
|
|
|
|
|
|
|
|
|
|
|
|
|
private void createExceptionLog(HttpServletRequest req, Throwable e) {
|
|
private void createExceptionLog(HttpServletRequest req, Throwable e) {
|
|
|
|
|
+ if(ObjectUtil.isEmpty(WebFrameworkUtils.getTenantId(req))) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// 插入错误日志
|
|
// 插入错误日志
|
|
|
ApiErrorLogCreateReqDTO errorLog = new ApiErrorLogCreateReqDTO();
|
|
ApiErrorLogCreateReqDTO errorLog = new ApiErrorLogCreateReqDTO();
|
|
|
try {
|
|
try {
|