Skip to content

Commit 4108156

Browse files
authored
🎨【小程序】不再打印发订阅消息的“43101用户未订阅消息”警告日志
1 parent 8878f06 commit 4108156

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import me.chanjar.weixin.common.enums.WxType;
3939
import me.chanjar.weixin.common.error.WxError;
4040
import me.chanjar.weixin.common.error.WxErrorException;
41+
import me.chanjar.weixin.common.error.WxMaErrorMsgEnum;
4142
import me.chanjar.weixin.common.error.WxRuntimeException;
4243
import me.chanjar.weixin.common.executor.CommonUploadRequestExecutor;
4344
import me.chanjar.weixin.common.service.WxImgProcService;
@@ -458,7 +459,10 @@ private <R, T> R executeInternal(
458459
}
459460

460461
if (error.getErrorCode() != 0) {
461-
log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uriWithAccessToken, dataForLog, error);
462+
if (error.getErrorCode() != WxMaErrorMsgEnum.CODE_43101.getCode()) {
463+
// 43101 日志太多, 不打印
464+
log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uriWithAccessToken, dataForLog, error);
465+
}
462466
throw new WxErrorException(error, e);
463467
}
464468
return null;

0 commit comments

Comments
 (0)