Function to convert gRPC `status.Status` to `DefaultError`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 130
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing DefaultError.GRPCStatus and the server-side gRPC interceptor referenced in the issue. Determine how the proposed client-side conversion should reconstruct the original error type, then add tests showing that conversion works for the supported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, grpc
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100