mirror of https://github.com/grpc/grpc-java.git
Correctly handle unknown http2 error code.
This commit is contained in:
parent
6f7c5143f1
commit
e36a64e6a6
|
@ -558,7 +558,9 @@ class OkHttpClientTransport implements ClientTransport {
|
||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static Status toGrpcStatus(ErrorCode code) {
|
static Status toGrpcStatus(ErrorCode code) {
|
||||||
return ERROR_CODE_TO_STATUS.get(code);
|
Status status = ERROR_CODE_TO_STATUS.get(code);
|
||||||
|
return status != null ? status : Status.UNKNOWN.withDescription(
|
||||||
|
"Unknown http2 error code: " + code.httpCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue