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

Client grabbing errors #728

Closed
ayenter opened this issue Aug 16, 2018 · 3 comments
Closed

Client grabbing errors #728

ayenter opened this issue Aug 16, 2018 · 3 comments
Labels

Comments

@ayenter
Copy link

ayenter commented Aug 16, 2018

This is not technically a bug with grpc-gateway, but more of a request for information/help for usage.

Steps you follow to reproduce the error:

  1. Setup and run a grpc-gateway with no backend service running (so that all requests fail).
  2. Send a legitimate REST call using a python requests client or php guzzle client.
  3. Send the same command using curl.
  4. Compare the error responses. (Curl command gives use information.)

What did you expect to happen instead:

I expected that the clients would pick-up the error message that curl did.
In the aforementioned situation, Curl returns useful information such as:
{"error":"transport is closing","message":"transport is closing","code":14}
or
{"error":"all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial tcp 123.45.678.910:12345: connect: operation timed out\"","code":14}

But the client will only return 503 Service Unavailable

What's your theory on why it isn't working:

I suspect that the errors are chunked or in the trailer, but I am unsure how to capture them using a client. I am hoping somebody could give me some insight towards a solution. Thanks!

@johanbrandhorst
Copy link
Collaborator

If curl does the right thing and requests and guzzle doesn't, it's probably up to how those have been configured, right? I bet you can get the same reponse data from both of those clients. This is probably not the best place to ask for help with configuring your python of PHP client unfortunately, so I will close this issue and direct you to the requests documentation.

@johanbrandhorst
Copy link
Collaborator

Think this was closed by mistake

@stale
Copy link

stale bot commented Sep 9, 2019

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 stale bot added the wontfix label Sep 9, 2019
@stale stale bot closed this as completed Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants