Skip to content

Commit ef106e0

Browse files
author
Xudong Ma
committed
Make the change on status effective.
1 parent f68c10b commit ef106e0

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

core/src/main/java/io/grpc/transport/Http2ClientStream.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,8 @@ private static Status statusFromHttpStatus(Metadata metadata) {
167167
Integer httpStatus = metadata.get(HTTP2_STATUS);
168168
if (httpStatus != null) {
169169
Status status = HttpUtil.httpStatusToGrpcStatus(httpStatus);
170-
if (!status.isOk()) {
171-
status.augmentDescription("extracted status from HTTP :status " + httpStatus);
172-
}
173-
return status;
170+
return status.isOk() ? status
171+
: status.augmentDescription("extracted status from HTTP :status " + httpStatus);
174172
}
175173
return null;
176174
}

0 commit comments

Comments
 (0)