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 trying to implement "If-Match" headers using gRPC-Gateway.
My first attempt was to return PRECONDITION_FAILED from my gRPC service after doing the ETag checks. At some point this worked in gRPC-Gateway, but this issue changed the behavior to no longer do that: #972
The following issue implies that what I should actually do is override the default http error codes in this situation: #1064. Unfortunately when I try the solution proffered in that issue I receive the following errors:
../../gateway/gateway.go:76:20: cannot assign to runtime.HTTPError
../../gateway/gateway.go:83:3: undefined: runtime.DefaultHTTPError
I would greatly appreciate a complete example that shows how to customize the http return code or that otherwise gives the best guidance on how to handle something like "If-Match."
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm trying to implement "If-Match" headers using gRPC-Gateway.
My first attempt was to return PRECONDITION_FAILED from my gRPC service after doing the ETag checks. At some point this worked in gRPC-Gateway, but this issue changed the behavior to no longer do that: #972
Looking in the existing documentation this seems to imply that this is the correct place to set up custom http status codes https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/#controlling-http-response-status-codes. Unfortunately this does not seem to be called in the situation where I've returned PRECONDITION_FAILED.
The following issue implies that what I should actually do is override the default http error codes in this situation: #1064. Unfortunately when I try the solution proffered in that issue I receive the following errors:
I would greatly appreciate a complete example that shows how to customize the http return code or that otherwise gives the best guidance on how to handle something like "If-Match."
The text was updated successfully, but these errors were encountered: