{"record":{"id":"d8315cef6bb292c9","repo":"alibaba/nacos","slug":"server-error-d8315c","errorCode":"SERVER_ERROR","errorMessage":"Import config to server failed.","messagePattern":"Import config to server failed\\.","errorType":"exception","errorClass":"NacosRuntimeException","httpStatus":500,"severity":"error","filePath":"console/src/main/java/com/alibaba/nacos/console/handler/impl/remote/config/ConfigImportAndExportService.java","lineNumber":132,"sourceCode":"            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\n     */\n    public ResponseEntity<byte[]> exportConfig(String dataId, String group, String namespaceId,\n        String appName,\n        List<Long> ids) throws Exception {","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/console/src/main/java/com/alibaba/nacos/console/handler/impl/remote/config/ConfigImportAndExportService.java#L114-L150","documentation":"Error \"Import config to server failed.\" thrown in alibaba/nacos.","triggerScenarios":"Thrown at console/src/main/java/com/alibaba/nacos/console/handler/impl/remote/config/ConfigImportAndExportService.java:132 when the library encounters an invalid state.","commonSituations":"Importing configs to the remote server failed.","solutions":["Inspect the server logs for the underlying cause, fix it, and retry the operation."],"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"}