{"id":"03200727b1b2c8fa","repo":"spring-projects/spring-boot","slug":"failed-to-description-from-service-at-url","errorCode":null,"errorMessage":"Failed to ${description} from service at '${url}' (${ex.getMessage()})","messagePattern":"Failed to (.+?) from service at '(.+?)' \\((.+?)\\)","errorType":"exception","errorClass":"ReportableException","httpStatus":null,"severity":"error","filePath":"cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java","lineNumber":192,"sourceCode":"\t/**\n\t * Retrieves the meta-data of the service at the specified URL.\n\t * @param url the URL\n\t * @return the response\n\t */\n\tprivate ClassicHttpResponse executeInitializrMetadataRetrieval(String url) {\n\t\tHttpGet request = new HttpGet(url);\n\t\trequest.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA));\n\t\treturn execute(request, URI.create(url), \"retrieve metadata\");\n\t}\n\n\tprivate ClassicHttpResponse execute(HttpUriRequest request, URI url, String description) {\n\t\ttry {\n\t\t\tHttpHost host = HttpHost.create(url);\n\t\t\trequest.addHeader(\"User-Agent\", \"SpringBootCli/\" + getClass().getPackage().getImplementationVersion());\n\t\t\treturn getHttp().executeOpen(host, request, null);\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tthrow new ReportableException(\n\t\t\t\t\t\"Failed to \" + description + \" from service at '\" + url + \"' (\" + ex.getMessage() + \")\");\n\t\t}\n\t}\n\n\tprivate ReportableException createException(String url, ClassicHttpResponse httpResponse) {\n\t\tStatusLine statusLine = new StatusLine(httpResponse);\n\t\tString message = \"Initializr service call failed using '\" + url + \"' - service returned \"\n\t\t\t\t+ statusLine.getReasonPhrase();\n\t\tString error = extractMessage(httpResponse.getEntity());\n\t\tif (StringUtils.hasText(error)) {\n\t\t\tmessage += \": '\" + error + \"'\";\n\t\t}\n\t\telse {\n\t\t\tint statusCode = statusLine.getStatusCode();\n\t\t\tmessage += \" (unexpected \" + statusCode + \" error)\";\n\t\t}\n\t\tthrow new ReportableException(message);\n\t}","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/5b2dbdbb8be64415eb6552f81ff7c449c8d251e6/cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java#L174-L210","documentation":"Error \"Failed to ${description} from service at '${url}' (${ex.getMessage()})\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java:192 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"5b2dbdbb8be64415eb6552f81ff7c449c8d251e6","analyzedAt":"2026-08-04T18:53:14.967Z","schemaVersion":2}