{"id":"624f8eb0fd8fa871","repo":"spring-projects/spring-boot","slug":"initializr-service-call-failed-using-url-se","errorCode":null,"errorMessage":"Initializr service call failed using '${url}' - service returned ${reasonPhrase}","messagePattern":"Initializr service call failed using '(.+?)' - service returned (.+?)","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":209,"sourceCode":"\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}\n\n\tprivate @Nullable String extractMessage(@Nullable HttpEntity entity) {\n\t\tif (entity != null) {\n\t\t\ttry {\n\t\t\t\tJSONObject error = getContentAsJson(entity);\n\t\t\t\tif (error.has(\"message\")) {\n\t\t\t\t\treturn error.getString(\"message\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprivate JSONObject getContentAsJson(HttpEntity entity) throws IOException, JSONException {","sourceCodeStart":191,"sourceCodeEnd":227,"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#L191-L227","documentation":"Error \"Initializr service call failed using '${url}' - service returned ${reasonPhrase}\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java:209 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}