grpc-gateway icon indicating copy to clipboard operation
grpc-gateway copied to clipboard

Incorrect mapping from grpc code to http code for canceled request.

Open brijeshvishwanath opened this issue 2 years ago • 3 comments

Fixes #2707

Brief description of what is fixed or changed

Incorrect mapping from grpc code to http code for canceled request.

The reference for error mapping in HTTPStatusFromCode is followed from: https://github.com/googleapis/googleapis/blob/942691f8dcf3e521be35d909de9bba3239feb471/google/rpc/code.proto#L40 And the reference claims that http code mapping for CANCELED grpc code is 499 (Client Closed Request), and not 408 (StatusRequestTimeout).

This MR changes this mapping.

Note: HTTP error code 499 const is not supported by go http pkg, hence I have used the integer literal.

brijeshvishwanath avatar May 23 '22 12:05 brijeshvishwanath

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

google-cla[bot] avatar May 23 '22 12:05 google-cla[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 31 '22 05:07 stale[bot]

Ping, could you please sign the CLA to have this merged?

johanbrandhorst avatar Jul 31 '22 23:07 johanbrandhorst

This has been contributed by someone else.

johanbrandhorst avatar Nov 01 '22 22:11 johanbrandhorst