herodot icon indicating copy to clipboard operation
herodot copied to clipboard

Function to convert gRPC `status.Status` to `DefaultError`

Open stephenpmurray opened this issue 1 year ago • 0 comments

Preflight checklist

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

stephenpmurray avatar Jan 28 '25 17:01 stephenpmurray