question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

client does not receive gRPC error

See original GitHub issue

We tried to use grpc-web with grpcwebproxy and ran into an issue that the client could not receive gPRC error.

  1. When server returns an error, our callback gets {err: null, response: <empty>}.

GatewayClientBase.prototype.rpcCall calls the callback on stream “data” and error “status” events. However the stream error “status” event never fires because it tries to look up grpc-status while the trailers body contains Grpc-Status.

We found a related issue https://github.com/improbable-eng/grpc-web/issues/228.

Which component was supposed to handle this case mismatch?

  1. Suppose the error “status” issue is fixed. When a gRPC error happens, the client first receives {err: null, response: <empty>}, then {err: <error>, response: null}. The client has to deal with the <empty> response everywhere, unable to tell easily it was a failure other than calling its getters returning undefined. What’s recommended pattern for a client to differentiate success vs. error?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
johanbrandhorstcommented, Oct 26, 2018

The improbable proxy should fix the issue of the upper-casing as it’s in violation of the spec. The grpc/grpc-web client could obviously implement a workaround but it should not be the one primarily responsible for fixing the incompatibility. I remain optimistic that it shouldn’t be very hard to fix, so if you want this done quickly you could take a look at submitting a PR to the improbable repo 😃.

1reaction
stanley-cheungcommented, Oct 26, 2018

We can certainly fix the upper-lower case issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GRPC Core: Status codes and their use in gRPC
Code Number Description OK 0 Not an error; returned on success. FAILED_PRECONDITION 9 OUT_OF_RANGE 11
Read more >
Client could not find service in gRPC server - Stack Overflow
I have a Python client that is trying to connect to the server through localhost:8080. The gRPC code for the client and server...
Read more >
gRPC Errors
A handy guide to gRPC errors ... gRPC is an amazing library, however, the documentation lacks details on error handling. The code examples...
Read more >
Troubleshoot gRPC on .NET Core - Microsoft Learn
The .NET gRPC client requires the service to have a trusted certificate. The following error message is returned when calling a gRPC service ......
Read more >
Connect to a Go GRPC Server running with TLS enabled ...
We are running a go-grpc server with TLS enabled. When we use the go-grpc-client it works perfectly fine with the Server. But when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found