We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb120a8 commit 6f3b757Copy full SHA for 6f3b757
stub/src/main/java/io/grpc/stub/ServerCalls.java
@@ -382,9 +382,10 @@ public void onNext(RespT response) {
382
383
@Override
384
public void onError(Throwable t) {
385
- Metadata metadata = Status.trailersFromThrowable(t);
386
- if (metadata == null) {
387
- metadata = new Metadata();
+ Metadata metadata = new Metadata();
+ Metadata trailers = Status.trailersFromThrowable(t);
+ if (trailers != null) {
388
+ metadata.merge(trailers);
389
}
390
call.close(Status.fromThrowable(t), metadata);
391
aborted = true;
0 commit comments