quarkusio/quarkus · error · IOException

IOException(e)

Error message

IOException(e)

What it means

QuarkusHttpFunction.dispatch wraps any non-IOException exception thrown while proxying the GCP HTTP request into an IOException (IOException(e)) so it can be rethrown from the HttpFunction.service signature. It signals the internal Netty virtual-host dispatch to the Vert.x HTTP server failed with an unexpected exception.

Source

Thrown at extensions/google-cloud-functions-http/runtime/src/main/java/io/quarkus/gcp/functions/http/QuarkusHttpFunction.java:86

        }
        deploymentStatus = error.toString();
    }

    @Override
    public void service(HttpRequest request, HttpResponse response) throws IOException {
        if (!started) {
            throw new IOException(deploymentStatus);
        }
        dispatch(request, response);
    }

    private void dispatch(HttpRequest request, HttpResponse response) throws IOException {
        try {
            nettyDispatch(request, response);
        } catch (IOException e) {
            throw e;
        } catch (Exception e) {
            throw new IOException(e);
        }
    }

    private void nettyDispatch(HttpRequest request, HttpResponse response)
            throws InterruptedException, IOException, ExecutionException {
        String path = request.getPath();
        Optional<String> host = request.getFirstHeader("Host");
        DefaultHttpRequest nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1,
                HttpMethod.valueOf(request.getMethod()), request.getQuery().map(q -> path + "?" + q).orElse(path));
        if (host.isPresent()) {
            nettyRequest.headers().set("Host", host.get());
        }
        for (Map.Entry<String, List<String>> header : request.getHeaders().entrySet()) {
            nettyRequest.headers().add(header.getKey(), header.getValue());
        }

        HttpContent requestContent = LastHttpContent.EMPTY_LAST_CONTENT;
        if (request.getContentLength() != 0) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inspect the wrapped cause (getCause()) for the real failure from the Netty/Vert.x dispatch
  2. Verify the Quarkus HTTP server (vertx-http) started and is listening on the virtual host
  3. Test the same endpoint locally against the Quarkus dev server to see the underlying application error
  4. Check for application exceptions in server logs at the same timestamp as the invocation
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check that the embedded server is reachable before dispatch
if (!Application.currentApplication().isStarted()) {
    throw new IllegalStateException("Vert.x HTTP server not started");
}

Try / catch

try {
    function.service(request, response);
} catch (IOException e) {
    Throwable cause = e.getCause();
    if (cause instanceof ExecutionException || cause instanceof InterruptedException) {
        LOG.errorf(e, "Dispatch to Vert.x failed");
        response.setStatusCode(502);
    } else throw e;
}

Prevention

When it happens

Trigger: nettyDispatch throws InterruptedException, ExecutionException, or any RuntimeException — e.g. the virtual connection to the embedded Vert.x server fails, request future fails, or serialization/writing the response errors.

Common situations: Quarkus HTTP server not listening (startup partially failed), request processing exception inside the application surfacing as ExecutionException, interrupted threads, or response payload handling errors.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/93b5acf45b92d2be. Report an issue: GitHub.