-
Notifications
You must be signed in to change notification settings - Fork 652
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
Since version 1.10.9 grpc-node doesnt comply with grpc spec in case of non 200 response #2822
Comments
OK, I see the problem: the RESOURCE_EXHAUSTED error from attempting to parse the response body is superseding the UNIMPLEMENTED error from the HTTP status. |
@murgatroid99 do you think it should be fixed ? |
Nothing has happened with this yet. |
We are experiencing a similar issue. A HTTP 502 error from the load balancer used to throw an UNAVAILABLE error, but now throws RESOURCE_EXHAUSTED "Received message larger than max" based on misinterpreting the response as a gRPC response. |
For others experiencing the same, the reported message body sizes in the case mentioned by @erlendnils1 are: 1633951815 = 0x61 0x64 0x20 0x47 or 'ad g', meaning the client received 'bad gateway' |
@tysseng and what about UPD: After some investigation, it looks like this message is related to not available resource (e.g. b/c of firewall). |
I am seeing this as well. When the gateway returns 504 timeout, it is misinterpreted and an error is thrown: This is with version 1.12.4. |
Problem description
When server returns HTTP 404 with "404 not found" in body grpc-node throws a RESOURCE_EXHAUSTED
Reproduction steps
Init your grpc client with a non grpc server, it should throw "UNIMPLEMENTED" error, instead it might throw "RESOURCE_EXHAUSTED"
Environment
Additional context
I think it's same issue as #2809
I want to add that this should be fixed in grpc-node as it doesn't comply with the grpc spec anymore. Reference
https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
When "404" is return by server then grpc status 12 and error UNIMPLEMENTED should be send to the client application.
Java and GO grpc library work that way and grpc-node used to work that way until this commit 674f4e3
The text was updated successfully, but these errors were encountered: