Skip to content

Commit 13e1c4b

Browse files
committed
fix error code
1 parent 2226149 commit 13e1c4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public WxMediaUploadResult uploadMedia(String mediaType, String fileType, InputS
3131
try {
3232
return this.uploadMedia(mediaType, FileUtils.createTmpFile(inputStream, UUID.randomUUID().toString(), fileType));
3333
} catch (IOException e) {
34-
throw new WxErrorException(WxError.newBuilder().setErrorMsg(e.getMessage()).build(), e);
34+
throw new WxErrorException(WxError.builder().errorMsg(e.getMessage()).build(), e);
3535
}
3636
}
3737

@@ -48,7 +48,7 @@ public File getMedia(String mediaId) throws WxErrorException {
4848
.create(this.wxMaService.getRequestHttp(), Files.createTempDirectory("wxma").toFile());
4949
return this.wxMaService.execute(executor, MEDIA_GET_URL, "media_id=" + mediaId);
5050
} catch (IOException e) {
51-
throw new WxErrorException(WxError.newBuilder().setErrorMsg(e.getMessage()).build(), e);
51+
throw new WxErrorException(WxError.builder().errorMsg(e.getMessage()).build(), e);
5252
}
5353
}
5454

0 commit comments

Comments
 (0)