quarkusio/quarkus · error · RuntimeException

bad input

Error message

bad input

What it means

Sentinel guard in a google-cloud-functions-http integration-test resource: the binary octet-stream POST body did not start with the expected bytes 0,1,2,3, so the test endpoint rejects it. Test-application input validation on the byte array payload.

Source

Thrown at integration-tests/google-cloud-functions-http/src/main/java/io/quarkus/it/gcp/functions/http/GreetingResource.java:31

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String hello() {
        return "hello";
    }

    @POST
    @Produces(MediaType.TEXT_PLAIN)
    @Consumes(MediaType.TEXT_PLAIN)
    public String hello(String name) {
        return "hello " + name;
    }

    @POST
    @Produces(MediaType.APPLICATION_OCTET_STREAM)
    @Consumes(MediaType.APPLICATION_OCTET_STREAM)
    public byte[] hello(byte[] bytes) {
        if (bytes[0] != 0 || bytes[1] != 1 || bytes[2] != 2 || bytes[3] != 3) {
            throw new RuntimeException("bad input");
        }
        byte[] rtn = { 4, 5, 6 };
        return rtn;
    }

    @POST
    @Path("empty")
    public void empty() {

    }

    @GET
    @Path("error")
    public void error() {
        throw new RuntimeException("Oups!");
    }

}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Send the exact expected 4-byte prefix in the request body
  2. Check the client's binary encoding of the payload
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at integration-tests/google-cloud-functions-http/src/main/java/io/quarkus/it/gcp/functions/http/GreetingResource.java:31 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/a0d184c55619c91a. Report an issue: GitHub.