Thrown StatusRuntimeException loses its trailers when GrpcExceptionHandler returns null
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- grpc, java, spring-boot
- Ambito
- backend
Direzione di ricerca
Start with GrpcExceptionHandlerInterceptor and the FallbackHandler it uses when the handler returns null, then compare how the thrown exception's trailers are handled with the trailers of the handler result, as the issue describes around commit 71355e6f and the gh-193 and gh-332 fixes. Done means a test where a handler returns null and a thrown StatusRuntimeException with trailers reaches the client with its trailers intact, matching what responseObserver.onError already does.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Throwing a StatusRuntimeException that carries trailers drops those trailers when GrpcExceptionHandler returns null.
The client still gets the status code and description, but google.rpc.Status details and any custom trailer keys are missing. Calling responseObserver.onError with the same exception keeps them. Returning null is the documented way for a handler to skip an exception it does not classify, and the sample server does that for anything other than IllegalArgumentException. Spring Boot registers GrpcExceptionHandlerInterceptor as a global interceptor even when there are no handler beans, so a thrown status goes through FallbackHandler.
FallbackHandler returns Status.fromThrowable(exception).asException(), which keeps the code and description and has no trailers. Up to 0.8 the interceptor closed the call with the thrown exception's trailers (71355e6f). The fixes for gh-193 and gh-332 switched to the trailers of the handler result, so the thrown trailers are lost when the handler returns null.
- Lingua principale
- Java
- Stelle
- 415
- Fork
- 104
- Merge medio
- 5g 15h
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di spring-projects/spring-grpc
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
spring-projects/spring-grpc#447 ·
-
Support for grpc-webApertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
spring-projects/spring-grpc#427 ·
-
Support for gRPC request-scoped Spring beans (equivalent to net.devh's @Scope("grpcRequest"))Forse già presa @Khyojae l’ha presa 178 giorni fa. Apertaenhancement good first issue help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
spring-projects/spring-grpc#392 · 6 commenti · 2 reazioni ·
-
Support for gRPC-JSON TranscodingForse già presa @AleksanderBrzozowski l’ha presa 83 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
spring-projects/spring-grpc#339 · 28 commenti · 1 reazione ·
-
Improve coverage of Java 17 and 25 w/ the Maven and Gradle sample appsForse già presa @kushagragarg55 l’ha presa 36 giorni fa. Apertatype: task
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
spring-projects/spring-grpc#300 · 6 commenti ·
Tutte le issue di spring-projects/spring-grpc
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ShaftHQ/SHAFT_ENGINE#7861 ·
I maintainer di solito rispondono entro 1 giorno
-
Flaky TunnelClientTest: fake server keeps sending fragments after the client closes the tunnelAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
MetricsHub/metricshub-community#1532 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
asciidoctor/asciidoctor-intellij-plugin#2157 ·
I maintainer di solito rispondono entro 4 giorni
-
account bug exercise lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno