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
I'm using the gRPC gateway and want to use the errorWriter only for non-HTTP (connect/gRPC) methods. Unfortunately the IsSupported() method yields true in too many cases (i.e. REST client sends application/json content type). Thus I cannot differentiate between HTTP and connect/grpc using the error writer.
I hoped the opt connect.WithRequireConnectProtocolHeader() would help me with that, but it seems to be not considered.
This PR fixes ErrorWriter to correctly return unsupported protocol if
the option WithRequireConnectProtocolHeader is set and the header or
query value isn't include in the request. It will now correctly return
unsupported to ensure fallback options can process the error.
Fixes#699
#700)
This PR fixes ErrorWriter to correctly return unsupported protocol if
the option `WithRequireConnectProtocolHeader` is set and the header or
query value isn't include in the request. It will now correctly return
unsupported to ensure fallback options can process the error.
Fixes#699
Describe the bug
I'm using the gRPC gateway and want to use the errorWriter only for non-HTTP (connect/gRPC) methods. Unfortunately the
IsSupported()
method yields true in too many cases (i.e. REST client sendsapplication/json
content type). Thus I cannot differentiate between HTTP and connect/grpc using the error writer.I hoped the opt
connect.WithRequireConnectProtocolHeader()
would help me with that, but it seems to be not considered.To Reproduce
See above snippet.
Environment (please complete the following information):
connect-go
version or commit:connectrpc.com/connect v1.14.0
go version
: (for example,go version go1.18.3 darwin/amd64
) v1.22.0Additional context
Slack thread: https://bufbuild.slack.com/archives/CRZ680FUH/p1708557962229309
Related issue: #689
The text was updated successfully, but these errors were encountered: