diff --git a/http-generator-helidon/src/main/java/io/avaje/http/generator/helidon/nima/ControllerMethodWriter.java b/http-generator-helidon/src/main/java/io/avaje/http/generator/helidon/nima/ControllerMethodWriter.java index e6f9c13d..1d71a749 100644 --- a/http-generator-helidon/src/main/java/io/avaje/http/generator/helidon/nima/ControllerMethodWriter.java +++ b/http-generator-helidon/src/main/java/io/avaje/http/generator/helidon/nima/ControllerMethodWriter.java @@ -103,6 +103,9 @@ void writeHandler(boolean requestScoped) { writer.append(" private void _%s(FilterChain chain, RoutingRequest req, RoutingResponse res) {", method.simpleName()).eol(); } else { writer.append(" private void _%s(ServerRequest req, ServerResponse res) throws Exception {", method.simpleName()).eol(); + } + + if (!isFilter) { int statusCode = method.statusCode(); if (statusCode > 0) { writer.append(" res.status(%s);", lookupStatusCode(statusCode)).eol();