quarkusio/quarkus · error · RuntimeException

No post data

Error message

No post data

What it means

Sentinel guard in an elytron-undertow integration-test JAX-RS resource: the POST body parameter 'data' arrived as null, so the test endpoint refuses to proceed. This is test-application validation of request input, not framework code.

Source

Thrown at integration-tests/elytron-undertow/src/main/java/io/quarkus/it/undertow/elytron/RootResource.java:19

package io.quarkus.it.undertow.elytron;

import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.SecurityContext;

@Path("/rest")
public class RootResource {

    @POST
    @Consumes(MediaType.TEXT_PLAIN)
    public String posts(String data, @Context SecurityContext sec) {
        if (data == null) {
            throw new RuntimeException("No post data");
        }
        if (sec.getUserPrincipal().getName() == null) {
            throw new RuntimeException("Failed to get user principal");
        }
        return "post success";
    }

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String approval(@Context SecurityContext sec) {
        if (sec.getUserPrincipal().getName() == null) {
            throw new RuntimeException("Failed to get user principal");
        }
        return "get success";
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Send a non-empty text/plain body with the POST request
  2. Check the client posts the expected payload
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at integration-tests/elytron-undertow/src/main/java/io/quarkus/it/undertow/elytron/RootResource.java:19 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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