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

Required HTTP params on List RPCs #164

Closed
bndw opened this issue May 6, 2024 · 3 comments
Closed

Required HTTP params on List RPCs #164

bndw opened this issue May 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bndw
Copy link
Contributor

bndw commented May 6, 2024

Title

Request parameters appear to now be required for HTTP GET requests on the list RPCs.

Version

ca33817

Description

The Connect API requires one or more request parameters to instantiate the request body on an HTTP GET. This is a change in behavior from the grpc-gateway implementation and breaks the embedded UI.

Repro steps

Make a GET request to the ListModules or ListModuleVersions RPC without any query params. This causes a 400.

curl localhost:31138/api/v1/modules
{"code":3, "message":"unmarshal message: zero-length payload is not a valid JSON object", "details":[]}

curl localhost:31138/api/v1/module-versions
{"code":3, "message":"unmarshal message: zero-length payload is not a valid JSON object", "details":[]}

Adding one or more request params will allow the server to handle the request

curl localhost:31138/api/v1/modules\?page_size=10
{"modules":[...]}

Ideally we can modify the server to continue supporting zero query params on the GET requests. If not, we must update the UI to handle the breaking change.

@bndw bndw added the bug Something isn't working label May 6, 2024
@dylan-bourque
Copy link
Collaborator

Honestly, I think I would rather keep this new behavior but improve the error message. Also, the equivalent CLI commands don't fail. 🤷

@dylan-bourque
Copy link
Collaborator

I spoke with the Buf devs and this is actually already fixed in vanguard-go but hasn't yet been released. See this issue.

@dylan-bourque
Copy link
Collaborator

This works against after updating vanguard-go to v0.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants