@@ -343,12 +343,14 @@ public String upload(String url, CommonUploadParam param) throws WxErrorExceptio
343
343
public <R , T > R execute (RequestExecutor <R , T > executor , String uri , T data )
344
344
throws WxErrorException {
345
345
String dataForLog ;
346
- if (data instanceof String ) {
346
+ if (data == null ) {
347
+ dataForLog = null ;
348
+ } else if (data instanceof String ) {
347
349
dataForLog = DataUtils .handleDataWithSecret ((String ) data );
348
350
} else {
349
351
dataForLog = data .toString ();
350
352
}
351
- return excuteWithRetry (
353
+ return executeWithRetry (
352
354
(uriWithAccessToken ) -> executor .execute (uriWithAccessToken , data , WxType .MiniApp ),
353
355
uri ,
354
356
dataForLog );
@@ -362,7 +364,7 @@ public WxMaApiResponse execute(
362
364
String data )
363
365
throws WxErrorException {
364
366
String dataForLog = "Headers: " + headers .toString () + " Body: " + data ;
365
- return excuteWithRetry (
367
+ return executeWithRetry (
366
368
(uriWithAccessToken ) -> executor .execute (uriWithAccessToken , headers , data , WxType .MiniApp ),
367
369
uri ,
368
370
dataForLog );
@@ -372,7 +374,7 @@ private static interface ExecutorAction<R> {
372
374
R execute (String urlWithAccessToken ) throws IOException , WxErrorException ;
373
375
}
374
376
375
- private <R , T > R excuteWithRetry (ExecutorAction <R > executor , String uri , String dataForLog )
377
+ private <R , T > R executeWithRetry (ExecutorAction <R > executor , String uri , String dataForLog )
376
378
throws WxErrorException {
377
379
int retryTimes = 0 ;
378
380
do {
0 commit comments