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

grpc-web. Response closed without headers but no way to get the status code. #1179

Open
mctrafik opened this issue Mar 13, 2024 · 0 comments

Comments

@mctrafik
Copy link

Versions of relevant software used

0.14.1

What happened

Getting Response closed without headers whenever making requests and the proxy does something that prevents communication w/ the underlying grpc server.

What you expected to happen

There's a ton of debug information that's returned from the server and I'm unable to get to any of it, because there's no status (307, 400, 401, 403, 500, 503, which are all possible w/ the proxy service) and I don't have access to raw HTTP headers either.

How to reproduce it (as minimally and precisely as possible):

Ping a service that doesn't serve grpc-web.
More speficially something that returns a redirect, but call with redirects: manual.

  unary(method, {
          request,
          host,
          metadata,
          transport: FetchReadableStreamTransport({
            credentials: 'include',
            redirect: 'manual',
          }),
          debug: false,
          onEnd: function (response) {
           // Want to detect here if `response` has a 307 redirect status, for example.
          },
        });

Full logs to relevant components

at grpc-web-client.umd.js:1:27882
    at grpc-web-client.umd.js:1:13425
    at Array.forEach (<anonymous>)
    at e3.rawOnError (grpc-web-client.umd.js:1:13380)
    at e3.onTransportEnd (grpc-web-client.umd.js:1:12087)

Anything else we need to know

My work around right now is to make my own transport, but the code is ugly and other people in my company are doing similar things, so it would be amazing if this was fixed at the package level. TYVM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant