We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If an exception is thrown within the Flow, the ExceptionMapper is not called and the request does not end.
Flow
No response
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow import org.jboss.resteasy.reactive.NoCache import org.jboss.resteasy.reactive.common.util.RestMediaType import javax.enterprise.context.ApplicationScoped import javax.ws.rs.GET import javax.ws.rs.Path import javax.ws.rs.Produces import org.jboss.resteasy.reactive.RestResponse import org.jboss.resteasy.reactive.server.ServerExceptionMapper import javax.ws.rs.core.MediaType class ExceptionMappers { @ServerExceptionMapper fun handleException(exception: Throwable): RestResponse<String> { return RestResponse.ResponseBuilder.serverError<String>().entity("ServerExceptionMapper -> Error").type(MediaType.TEXT_PLAIN).build() } } @Path("/bug") @ApplicationScoped class ReproducerResource { @GET @Path("1") @NoCache @Produces(RestMediaType.APPLICATION_NDJSON) suspend fun reproduceBug(): Flow<String> { return flow { emit("Test1") if (true) { throw IllegalArgumentException("IllegalArgumentException -> Error") } } } }
uname -a
ver
java -version
Java 11
2.9.1.Final
mvnw --version
gradlew --version
Maven
The text was updated successfully, but these errors were encountered:
/cc @FroMage, @evanchooly, @geoand, @stuartwdouglas
Sorry, something went wrong.
This happens by design for all types that stream data. I'll update https://quarkus.io/guides/resteasy-reactive#streaming-support to make a note of this
Mention exception mappers in streaming response note
2f4decc
Relates to: quarkusio#25744
OK. Thanks. I had already suspected something like that.
Merge pull request #25745 from geoand/#25744
8f97b8d
18c3bf7
Relates to: quarkusio#25744 (cherry picked from commit 2f4decc)
No branches or pull requests
Describe the bug
If an exception is thrown within the
Flow
, the ExceptionMapper is not called and the request does not end.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
Java 11
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven
Additional information
No response
The text was updated successfully, but these errors were encountered: