🎨 #1482 小程序接口请求出错超过重试次数时将微信原始错误信息抛出来

This commit is contained in:
Binary Wang 2020-04-04 13:44:58 +08:00
parent 61e6221bd7
commit 7f6780a4e3

View File

@ -239,7 +239,10 @@ public class WxMaServiceImpl implements WxMaService, RequestHttp<CloseableHttpCl
if (retryTimes + 1 > this.maxRetryTimes) {
log.warn("重试达到最大次数【{}】", maxRetryTimes);
//最后一次重试失败后直接抛出异常不再等待
throw new RuntimeException("微信服务端异常,超出重试次数");
throw new WxErrorException(WxError.builder()
.errorCode(e.getError().getErrorCode())
.errorMsg("微信服务端异常,超出重试次数!")
.build());
}
WxError error = e.getError();