Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add content-type header to grpc error locations #2229

Merged
merged 1 commit into from Dec 1, 2021

Conversation

ciarams87
Copy link
Member

@ciarams87 ciarams87 commented Nov 30, 2021

Proposed changes

The gRPC Go client shows errors when handling error pages returned from the IC (e.g. when a backend is unavailable). This resolves one of the issues (malformed header response), e.g.:

Current error:
./grpc_client -address virtual-server.example.com:443 2021/11/30 14:32:41 could not greet: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 204 (No Content); malformed header: missing HTTP content-type

After this commit:
./grpc_client -address virtual-server.example.com:443 2021/11/30 14:21:05 could not greet: rpc error: code = Unknown desc = unexpected HTTP status code received from server: 204 (No Content)

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@github-actions github-actions bot added the chore Pull requests for routine tasks label Nov 30, 2021
@nginx-bot nginx-bot force-pushed the chore/add-correct-grpc-header-type branch from 7ee442d to 0597482 Compare November 30, 2021 16:51
@nginx-bot nginx-bot force-pushed the chore/add-correct-grpc-header-type branch from 0597482 to df8fb22 Compare November 30, 2021 18:36
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, in my tests, the response I got when there are no available endpoints:

2021/11/30 17:22:34 could not greet: rpc error: code = Unavailable desc = unavailable

which looks good.

@ciarams87 ciarams87 merged commit d334ef9 into master Dec 1, 2021
@ciarams87 ciarams87 deleted the chore/add-correct-grpc-header-type branch December 1, 2021 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants