Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to deserialize Status from a raw payload #2081

Open
piotrkowalczuk opened this issue Oct 3, 2024 · 1 comment
Open

Being able to deserialize Status from a raw payload #2081

piotrkowalczuk opened this issue Oct 3, 2024 · 1 comment
Labels
kind/enhancement Improvements to existing feature.

Comments

@piotrkowalczuk
Copy link

Is your feature request related to a problem? Please describe it.

Some gRPC services are hidden behind proxies that translate RESTful into gRPC like:

Such a middleman can handle both application/json and application/x-protobuf. In the former case, however, the server would respond using application/x-protobuf as well. In such a scenario, it is necessary to deserialize the gRPC error message manually.

Describe the solution you'd like

Status could get additional constructor init<Bytes: SwiftProtobufContiguousBytes>(serializedBytes bytes: Bytes) in a similar fasion Go library does

@piotrkowalczuk piotrkowalczuk added the kind/enhancement Improvements to existing feature. label Oct 3, 2024
@glbrntt
Copy link
Collaborator

glbrntt commented Dec 18, 2024

Are you talking about google.rpc.Status specifically? If so we have support for this in v2: grpc/grpc-swift-protobuf@fd197ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements to existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants