GoogleCloudPlatform / GoogleCloudPlatform/esp-v2

Support modifying gRPC application errors

Open
#522 16 comments 0 reactions 1 assignee Claimed by @nareddyt View on GitHub
enhancement
Dominant language
Go
Stars
307
Forks
185
Avg merge
14h 45m
Merged PRs (30d)
6

Description

Hej,
When using cloud endpoints espV2 using Proto Descriptors with HTTP annotations it is unclear on if we can return a custom error json body for HTTP Clients.

Using the google.rpc.Status proto allows us to conform to best practices going forward but when we need to build http endpoints that need to conform to a specific Error Schema for services outside of our control it limits our ability to move towards a pure grpc implementation for our backend services while also being able to serve our http clients.
```
ex. { "errors" : [ "field" : "string", "code": "string", "message" : "string"],[ "field" : "string", "code": "string", "message" : "string"] ]}
```
I found this issue
* https://github.com/envoyproxy/envoy/issues/1178
> that seems to be addressed in
* https://github.com/envoyproxy/envoy/pull/11007

which seems allow the serving of custom error responses however I have not found any documentation describing if this is possible to do in EspV2.

I'm hopeful the capability exists and if so if you could please point me to an example it would be greatly appreciated.

If the capability does not exist if you could enable it in some way maybe by a custom metadata trailer bin / header where we could encode the proper error json response for http clients while setting the correct http response code that would be amazing.

The implementation that I am using today is using ESPv2 as a sidecar within K8s and it has been working perfectly however the need to support customer error messages for http clients is very high.

Thank for the great functionality EspV2 brings to the table!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.