line / armeria

Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
https://armeria.dev
Apache License 2.0
4.73k stars 899 forks source link

Add `Status` parameter to `GrpcExceptionHandlerFunction.apply()` method. #5786

Closed minwoox closed 6 days ago

minwoox commented 1 week ago

Motivation: When an exception is raised, GrpcService creates a new Status from Status.getCause() via GrpcExceptionHandlerFunction. This can result in sending an incorrect status in certain situations:

Modifications:

Result:

github-actions[bot] commented 1 week ago

🔍 Build Scan® (commit: c2afc7fbf66758b793597161b618a29a969b0fea)

Job name Status Build Scan®
build-windows-latest-jdk-21 https://ge.armeria.dev/s/jrramipvcataw
build-self-hosted-unsafe-jdk-8 https://ge.armeria.dev/s/b52oxbxjmxqvg
build-self-hosted-unsafe-jdk-21-snapshot-blockhound https://ge.armeria.dev/s/mw654z7plio5s
build-self-hosted-unsafe-jdk-17-min-java-17-coverage ❌ (failure) https://ge.armeria.dev/s/oiteuo3p5gf7s
build-self-hosted-unsafe-jdk-17-min-java-11 https://ge.armeria.dev/s/4lbtvw35c3xlw
build-self-hosted-unsafe-jdk-17-leak https://ge.armeria.dev/s/k7idrctef7eik
build-self-hosted-unsafe-jdk-11 https://ge.armeria.dev/s/zx4anzqeokvk6
build-macos-12-jdk-21 https://ge.armeria.dev/s/4dfnexi3ezmes