Skip to content

Commit

Permalink
Return specific grpc status code on http error
Browse files Browse the repository at this point in the history
  • Loading branch information
harmangakhal authored and stanley-cheung committed Aug 23, 2019
1 parent 9365fd6 commit 1711674
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions javascript/net/grpc/web/grpcwebclientreadablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ const GrpcWebClientReadableStream = function(genericTransportInterface) {
case ErrorCode.TIMEOUT:
grpcStatusCode = StatusCode.DEADLINE_EXCEEDED;
break;
case ErrorCode.HTTP_ERROR:
grpcStatusCode = StatusCode.fromHttpStatus(self.xhr_.getStatus());
break;
default:
grpcStatusCode = StatusCode.UNAVAILABLE;
}
Expand Down

0 comments on commit 1711674

Please sign in to comment.