binarywang/WxJava · error · WxErrorException
错误代码:{errorCode}, 错误信息:{errorMsg}
Error message
错误代码:{errorCode}, 错误信息:{errorMsg} What it means
Error "错误代码:{errorCode}, 错误信息:{errorMsg}" thrown in binarywang/WxJava.
Source
Thrown at weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/apache/ApacheMinishopMediaUploadRequestExecutor.java:48
@Override
public WxMinishopImageUploadResult execute(String uri, File file, WxType wxType) throws WxErrorException, IOException {
HttpPost httpPost = new HttpPost(uri);
if (requestHttp.getRequestHttpProxy() != null) {
RequestConfig config = RequestConfig.custom().setProxy(requestHttp.getRequestHttpProxy()).build();
httpPost.setConfig(config);
}
if (file != null) {
HttpEntity entity = MultipartEntityBuilder
.create()
.addBinaryBody("media", file)
.setMode(HttpMultipartMode.RFC6532)
.build();
httpPost.setEntity(entity);
}
String responseContent = requestHttp.getRequestHttpClient().execute(httpPost, Utf8ResponseHandler.INSTANCE);
WxError error = WxError.fromJson(responseContent, wxType);
if (error.getErrorCode() != 0) {
throw new WxErrorException(error);
}
log.info("responseContent: {}", responseContent);
return WxMinishopImageUploadResult.fromJson(responseContent);
}
}
View on GitHub (pinned to 1c43293a3c)
Solutions
- 根据返回的 errorCode 对照微信接口文档确认具体错误原因并修正请求参数。
- 检查 access_token 是否有效、请求路径与参数是否正确,媒体文件格式和大小是否符合要求。
When it happens
Trigger: Thrown at weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/apache/ApacheMinishopMediaUploadRequestExecutor.java:48 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of binarywang/WxJava@1c43293a3c (2026-08-14).
Data as JSON: /api/errors/ab57b76eca696c34.
Report an issue: GitHub.