{"record":{"id":"39d4bcb5cf6017b5","repo":"binarywang/WxJava","slug":"httpexception-getmessage","errorCode":null,"errorMessage":"{httpException.getMessage()}","messagePattern":"\\{httpException\\.getMessage\\(\\)\\}","errorType":"exception","errorClass":"ClientProtocolException","httpStatus":null,"severity":"error","filePath":"weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/hc/HttpComponentsMediaDownloadRequestExecutor.java","lineNumber":75,"sourceCode":"          // application/json; encoding=utf-8 下载媒体文件出错\n          String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response);\n          throw new WxErrorException(WxError.fromJson(responseContent, wxType));\n        }\n      }\n\n      String fileName = HttpResponseProxy.from(response).getFileName();\n      if (StringUtils.isBlank(fileName)) {\n        fileName = String.valueOf(System.currentTimeMillis());\n      }\n\n      String baseName = FilenameUtils.getBaseName(fileName);\n      if (StringUtils.isBlank(fileName) || baseName.length() < 3) {\n        baseName = String.valueOf(System.currentTimeMillis());\n      }\n\n      return FileUtils.createTmpFile(inputStream, baseName, FilenameUtils.getExtension(fileName), super.tmpDirFile);\n    } catch (HttpException httpException) {\n      throw new ClientProtocolException(httpException.getMessage(), httpException);\n    }\n  }\n\n}\n","sourceCodeStart":57,"sourceCodeEnd":80,"githubUrl":"https://github.com/binarywang/WxJava/blob/1c43293a3c2c9d7e91304b6d037fb017f680d0c6/weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/hc/HttpComponentsMediaDownloadRequestExecutor.java#L57-L80","documentation":"Error \"{httpException.getMessage()}\" thrown in binarywang/WxJava.","triggerScenarios":"Thrown at weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http/hc/HttpComponentsMediaDownloadRequestExecutor.java:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["查看异常中携带的原始 httpException 信息定位网络或 IO 层错误。","检查网络连通性、代理与超时配置，确认目标微信接口地址可访问。"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c43293a3c2c9d7e91304b6d037fb017f680d0c6","analyzedAt":"2026-08-14T02:29:11.060Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}