{"record":{"id":"0e14b9773de45201","repo":"alibaba/nacos","slug":"responseexception-getmessage","errorCode":null,"errorMessage":"${responseException.getMessage()}","messagePattern":"\\$\\{responseException\\.getMessage\\(\\)\\}","errorType":"exception","errorClass":"NacosRuntimeException","httpStatus":null,"severity":"error","filePath":"console/src/main/java/com/alibaba/nacos/console/handler/impl/remote/config/ConfigImportAndExportService.java","lineNumber":128,"sourceCode":"            String contentTypeString =\n                null == importFile.getContentType() ? MediaType.MULTIPART_FORM_DATA_VALUE\n                    : importFile.getContentType();\n            ContentType contentType = ContentType.create(contentTypeString, Constants.ENCODE);\n            MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create();\n            multipartEntityBuilder.addBinaryBody(\"file\", importFile.getInputStream(), contentType,\n                importFile.getOriginalFilename());\n            multipartEntityBuilder.addTextBody(\"policy\", policy.name(), contentType);\n            HttpEntity entity = multipartEntityBuilder.build();\n            httpPost.setEntity(entity);\n            String executeResult =\n                httpClient.execute(httpPost, new BasicHttpClientResponseHandler());\n            return JacksonUtils.toObj(executeResult, new TypeReference<>() {\n            });\n        } catch (HttpResponseException responseException) {\n            LOGGER.error(\"Import config to server {} failed with code {}: \",\n                serverMember.getAddress(),\n                responseException.getStatusCode());\n            throw new NacosRuntimeException(responseException.getStatusCode(),\n                responseException.getMessage());\n        } catch (IOException | URISyntaxException e) {\n            LOGGER.error(\"Import config to server {} failed: \", serverMember.getAddress(), e);\n            throw new NacosRuntimeException(NacosException.SERVER_ERROR,\n                \"Import config to server failed.\");\n        }\n    }\n    \n    /**\n     * Do export config to from server.\n     *\n     * @param dataId        data id of export config\n     * @param group         group name of export config\n     * @param namespaceId   namespace of export config\n     * @param appName       app name of export config\n     * @param ids           storage id of export config\n     * @return export file entity\n     * @throws Exception    any exception during export config","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/console/src/main/java/com/alibaba/nacos/console/handler/impl/remote/config/ConfigImportAndExportService.java#L110-L146","documentation":"Error \"${responseException.getMessage()}\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at console/src/main/java/com/alibaba/nacos/console/handler/impl/remote/config/ConfigImportAndExportService.java:128 when the library encounters an invalid state.","commonSituations":"The remote server returned an error during config import.","solutions":["Review the input and runtime state for config import remote error, correct the reported problem, and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}