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
This causes retrying problem because the client will retry RefusedStream errors unconditionally.
Since InTapHandler is mostly used for auth checking, a status with code PERMISSION_DENIED would be preferred.
We can also allow users to set the status code, if we want to keep it as a general purpose pre-message interceptor. This could get a bit tricky since InTapHandler is processed in the transport. But since status is now in its own package, this shouldn't be a problem.
The text was updated successfully, but these errors were encountered:
We can also allow users to set the status code
...
But since status is now in its own package
@menghanl - What kind of status code were you thinking? We do a RST_STREAM here, so it must be an http2 error code, no? Or were you thinking this could result in trailers being sent immediately by the server?
I was thinking we end the stream with a gRPC status
So, send trailers instead of RST_STREAM? (Actually, send trailers, then still send a RST_STREAM after that since the client is presumably not half-closed yet.) That SGTM.
Currently, InTapHandler error causes a RST_STREAM with RefusedStream
grpc-go/internal/transport/http2_server.go
Lines 363 to 376 in d8ef479
Since InTapHandler is mostly used for auth checking, a status with code
PERMISSION_DENIED
would be preferred.We can also allow users to set the status code, if we want to keep it as a general purpose pre-message interceptor. This could get a bit tricky since InTapHandler is processed in the transport. But since status is now in its own package, this shouldn't be a problem.
The text was updated successfully, but these errors were encountered: