79662734

Date: 2025-06-11 22:42:41
Score: 2
Natty:
Report link

traditional approach is initializing mux with option, that decides which code to set based on grpc-metadata in context. Also there is way of manipulating codes per rpc(enpoint) using options in proto definitions, but i have not tried that way yet.
Actually, nowdays both ways are described at https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/#controlling-http-response-status-codes

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Дов Машле