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

API Middleware/ gRPC gateway handling custom http response codes #10745

Closed
james-prysm opened this issue May 24, 2022 · 2 comments
Closed

API Middleware/ gRPC gateway handling custom http response codes #10745

james-prysm opened this issue May 24, 2022 · 2 comments
Labels
API Api related tasks

Comments

@james-prysm
Copy link
Contributor

james-prysm commented May 24, 2022

🚀 Feature Request

Description

With more Rest based API integrations added to Prysm we need more flexibility with our API middleware/gRPC gateway setup. Currently, our API Middleware/ gRPC gateway setup doesn't allow us to return custom codes for successes (so only 200 ok)

these are the current mappings
Ideally, we would like a way to override this for more custom codes such as 202 on our API returns.

some examples where this is used.

  1. keymanager api set fee recipient
  2. blinded_block

Describe the solution you'd like

we should provide a way to customize a new gRPC option for custom returns
https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_your_gateway/#controlling-http-response-status-codes

@james-prysm james-prysm changed the title API Middleware/ gRPC gateway handling 202s API Middleware/ gRPC gateway handling custom http response codes May 24, 2022
@prestonvanloon
Copy link
Member

@rkapka rkapka added the API Api related tasks label May 24, 2022
@rkapka
Copy link
Contributor

rkapka commented Jun 29, 2022

Closed with #10850

@rkapka rkapka closed this as completed Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks
Projects
None yet
Development

No branches or pull requests

3 participants