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
If I want to give response with non ok status code then I can't send a message. But I may want to send cause of this error and some solution for it in my message
The text was updated successfully, but these errors were encountered:
Is this request for other 2xx status codes of for returning more information in the error? Why can't you simply include more information in the error?
For example : I want to raise 429 error and send a captcha-token, I this line of code: context.set_code(grpc.StatusCode.RESOURCE_EXHAUSTED)
And after that I can't send a captcha-token in message
You can set the message of the error before returning it. I'm not familiar with the snippet you've posted, but whatever language your gRPC server is written in will support some way to set a message in addition to this method for setting a code. This message is returned in the grpc-gateway response.
I will close this issue since I think this is covered by existing functionality. If you need further help with your setup please reach out in the #grpc-gateway channel of the Gophers slack channel: https://invite.slack.golangbridge.org/.
If I want to give response with non ok status code then I can't send a message. But I may want to send cause of this error and some solution for it in my message
The text was updated successfully, but these errors were encountered: