You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a request comes, the authentication middleware takes care of figuring out whether to proceed or not and if NOT it issues a response with a 401 status WITHOUTcontent-type header:
RpcError: missing response content type
at parseFormat (http://localhost:6000/node_modules/.vite/@protobuf-ts_grpcweb-transport.js?v=16e233eb:190:13)
at readGrpcWebResponseHeader (http://localhost:6000/node_modules/.vite/@protobuf-ts_grpcweb-transport.js?v=16e233eb:116:51)
at readGrpcWebResponseHeader (http://localhost:6000/node_modules/.vite/@protobuf-ts_grpcweb-transport.js?v=16e233eb:109:12)
at http://localhost:6000/node_modules/.vite/@protobuf-ts_grpcweb-transport.js?v=16e233eb:373:34
Is this correct or should we handle this cases in parseFormat()?
The text was updated successfully, but these errors were encountered:
Fixed grpcweb-transport to handle responses with HTTP error status and missing content-type header.
Breaking changes:
The function `readGrpcWebResponseHeader()` no longer returns the format.
The function `readGrpcWebResponseBody()` no longer takes the format as an argument. Instead, it now takes the content-type response header value and determines the format on its own.
gRPC-web transport should detect HTTP 401 and raise a GrpcError UNAUTHENTICATED. It should not fall on its face because of the omitted header in this case.
I don't know if this is a problem with this library or not.
I am building my backend server and I have the grpc route like this:
When a request comes, the authentication middleware takes care of figuring out whether to proceed or not and if NOT it issues a response with a 401 status WITHOUT
content-type
header:But now I get this error:
Is this correct or should we handle this cases in
parseFormat()
?The text was updated successfully, but these errors were encountered: