quarkusio/quarkus · error · RuntimeException
Got empty HTTP response body ${requestURI.completeURLString(
Error message
Got empty HTTP response body ${requestURI.completeURLString()} What it means
After receiving HTTP 200, exchange() reads the body; if the response body is an empty string it throws a RuntimeException with the request URL. A 200 with an empty body means the server answered but returned no configuration payload, which cannot be deserialized into a Response object.
Source
Thrown at extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/VertxSpringCloudConfigGateway.java:223
.get(requestURI.port(), requestURI.host(), requestURI.completeURLString())
.ssl(UrlUtility.isHttps(requestURI.baseURI()))
.putHeader("Accept", "application/json");
if (config.usernameAndPasswordSet()) {
request.basicAuthentication(config.username().get(), config.password().get());
}
for (Map.Entry<String, String> entry : config.headers().entrySet()) {
request.putHeader(entry.getKey(), entry.getValue());
}
log.debug("Attempting to read configuration from '" + requestURI.completeURLString() + "'.");
return request.send().map(r -> {
log.debug("Received HTTP response code '" + r.statusCode() + "'");
if (r.statusCode() != 200) {
throw new RuntimeException("Got unexpected HTTP response code " + r.statusCode()
+ " from " + requestURI.completeURLString());
} else {
String bodyAsString = r.bodyAsString();
if (bodyAsString.isEmpty()) {
throw new RuntimeException("Got empty HTTP response body " + requestURI.completeURLString());
}
try {
log.debug("Attempting to deserialize response");
return OBJECT_MAPPER.readValue(bodyAsString, Response.class);
} catch (JacksonException e) {
throw new RuntimeException("Got unexpected error " + e.getOriginalMessage());
}
}
});
}
@Override
public void close() {
this.webClient.close();
this.vertx.closeAndAwait();
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Curl the exact URL and inspect the raw response body
- Verify the request goes to the Config Server, not a proxy/landing page (check the URL path /application/profile[/label])
- Fix or bypass the intermediary stripping the body; upgrade the Config Server if it returns empty bodies for empty repos
Example fix
// before quarkus.spring-cloud-config.url=http://gateway.internal/config // after quarkus.spring-cloud-config.url=http://config-server:8888
Defensive patterns
Strategy: retry
Validate before calling
// verify the server returns a JSON payload
String body = httpClient.get(configUrl + "/app/profile").body();
if (body == null || body.isEmpty()) throw new IllegalStateException("Empty config payload"); Try / catch
catch (RuntimeException e) {
if (e.getMessage().contains("Got empty HTTP response body")) {
log.error("Server returned 200 with empty body; check proxies/server", e);
}
} Prevention
- Curl the endpoint and inspect the raw body before blaming the client
- Bypass proxies when testing
- Keep the Config Server up to date
When it happens
Trigger: Config Server returning 200 with zero-length body — typically seen with misconfigured server endpoints, empty repositories where the server misbehaves instead of returning proper JSON, or intermediary proxies stripping bodies.
Common situations: Reverse proxies/load balancers answering 200 with empty content; server-side bugs on specific property sources; HEAD-like responses from misrouted requests.
Related errors
- Got unexpected HTTP response code ${r.statusCode()} from ${r
- Unable to obtain configuration from Spring Cloud Config Serv
- Got unexpected error ${e.getOriginalMessage()}
- Failed to resolve application model <appArtifact> dependenci
- Failed to initialize Quarkus Maven extension manager
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/e37e0761b526bbca.
Report an issue: GitHub.