herodot
herodot copied to clipboard
Function to convert gRPC `status.Status` to `DefaultError`
Preflight checklist
- [x] I could not find a solution in the existing issues, docs, nor discussions.
- [x] I agree to follow this project's Code of Conduct.
- [x] I have read and am following this repository's Contribution Guidelines.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe your problem
Although this package contains a server-side gRPC interceptor, there doesn't appear to be a function in the library to convert back from gRPC status.Status() in the client side.
Describe your ideal solution
Would you be open to a pr that adds a function like this?
func (status.Status) DefaultError {}
This function would effectively reverse the steps of DefaultError.GRPCStatus() to reconstruct the original type.
Workarounds or alternatives
I was going to make the function myself anyway, but I may as well add it to the library if this is something others would benefit from
Version
v0.10.2
Additional Context
No response