{"record":{"id":"93b5acf45b92d2be","repo":"quarkusio/quarkus","slug":"ioexception-e","errorCode":null,"errorMessage":"IOException(e)","messagePattern":"IOException\\(e\\)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"extensions/google-cloud-functions-http/runtime/src/main/java/io/quarkus/gcp/functions/http/QuarkusHttpFunction.java","lineNumber":86,"sourceCode":"        }\n        deploymentStatus = error.toString();\n    }\n\n    @Override\n    public void service(HttpRequest request, HttpResponse response) throws IOException {\n        if (!started) {\n            throw new IOException(deploymentStatus);\n        }\n        dispatch(request, response);\n    }\n\n    private void dispatch(HttpRequest request, HttpResponse response) throws IOException {\n        try {\n            nettyDispatch(request, response);\n        } catch (IOException e) {\n            throw e;\n        } catch (Exception e) {\n            throw new IOException(e);\n        }\n    }\n\n    private void nettyDispatch(HttpRequest request, HttpResponse response)\n            throws InterruptedException, IOException, ExecutionException {\n        String path = request.getPath();\n        Optional<String> host = request.getFirstHeader(\"Host\");\n        DefaultHttpRequest nettyRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1,\n                HttpMethod.valueOf(request.getMethod()), request.getQuery().map(q -> path + \"?\" + q).orElse(path));\n        if (host.isPresent()) {\n            nettyRequest.headers().set(\"Host\", host.get());\n        }\n        for (Map.Entry<String, List<String>> header : request.getHeaders().entrySet()) {\n            nettyRequest.headers().add(header.getKey(), header.getValue());\n        }\n\n        HttpContent requestContent = LastHttpContent.EMPTY_LAST_CONTENT;\n        if (request.getContentLength() != 0) {","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/google-cloud-functions-http/runtime/src/main/java/io/quarkus/gcp/functions/http/QuarkusHttpFunction.java#L68-L104","documentation":"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.","triggerScenarios":"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.","commonSituations":"Quarkus HTTP server not listening (startup partially failed), request processing exception inside the application surfacing as ExecutionException, interrupted threads, or response payload handling errors.","solutions":["Inspect the wrapped cause (getCause()) for the real failure from the Netty/Vert.x dispatch","Verify the Quarkus HTTP server (vertx-http) started and is listening on the virtual host","Test the same endpoint locally against the Quarkus dev server to see the underlying application error","Check for application exceptions in server logs at the same timestamp as the invocation"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-check that the embedded server is reachable before dispatch\nif (!Application.currentApplication().isStarted()) {\n    throw new IllegalStateException(\"Vert.x HTTP server not started\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    function.service(request, response);\n} catch (IOException e) {\n    Throwable cause = e.getCause();\n    if (cause instanceof ExecutionException || cause instanceof InterruptedException) {\n        LOG.errorf(e, \"Dispatch to Vert.x failed\");\n        response.setStatusCode(502);\n    } else throw e;\n}","preventionTips":["Always inspect getCause() — the IOException is only a wrapper","Test endpoints against local Quarkus dev mode to expose application-level errors","Log server-side exceptions; the function surface only shows the wrapper","Check that vertx-http extension is present and the app fully started"],"tags":["gcp","http","netty","proxy"],"backgroundTag":"http-request-dispatch-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}