quarkusio/quarkus · info · NoStackTraceException

dummy2

Error message

dummy2

What it means

A NoStackTraceException with message 'dummy2' is thrown inside a Uni produced by the reactiveException endpoint of the ReactiveResource OpenTelemetry test. It simulates a failure occurring inside a reactive pipeline so tests can assert the exception is attached to the OTel span even when raised on a Mutiny subscription thread rather than the request thread.

Source

Thrown at integration-tests/opentelemetry-reactive/src/main/java/io/quarkus/it/opentelemetry/reactive/ReactiveResource.java:104

    @POST
    public Uni<String> helloPost(String body) {
        Span span = tracer.spanBuilder("helloPost").startSpan();
        return Uni.createFrom().item("Hello " + body).onItem().delayIt().by(Duration.ofMillis(MILLISECONDS_DELAY))
                .eventually((Runnable) span::end);
    }

    @Path("blockingException")
    @GET
    public String blockingException() {
        throw new NoStackTraceException("dummy");
    }

    @Path("reactiveException")
    @GET
    public Uni<String> reactiveException() {
        return Uni.createFrom().item(() -> {
            throw new NoStackTraceException("dummy2");
        });
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. This is intentional — confirm the test asserts the exception appears on the span recorded via the OTel collector.
  2. Do not treat the 500 response as a regression for this endpoint.
  3. For manual exploration, call a non-exception endpoint of the same resource.
  4. When reusing the pattern in tests, keep NoStackTraceException to keep logs clean.

Example fix

// before
@Path("reactiveException")
@GET
public Uni<String> reactiveException() {
    return Uni.createFrom().item(() -> { throw new NoStackTraceException("dummy2"); });
}
// after (non-throwing variant for manual use)
@Path("reactiveException")
@GET
public Uni<String> reactiveException() {
    return Uni.createFrom().item("ok");
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (path.endsWith("reactiveException")) {
    // Uni fails by design; expect 500 and assert span exception on the reactive pipeline
}

Try / catch

try {
    response = given().get("/reactiveException");
} catch (Exception e) {
    // expected: Uni fails with NoStackTraceException("dummy2") -> 500
}
// then assert the OTel span has an exception event with message 'dummy2'

Prevention

When it happens

Trigger: GET .../reactiveException is called; the returned Uni is subscribed to and the item supplier throws NoStackTraceException('dummy2'), failing the reactive pipeline with a 500 response.

Common situations: Seen when running the opentelemetry-reactive integration tests or hitting the endpoint manually; distinguishes reactive-pipeline exceptions from blocking ones (errorIndex 4054).

Related errors


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