Repository navigation
Send Connect-Protocol-Version: 1 instead of 1.0 - #70
Merged
Merged
Conversation
The spec this SDK was generated from types the header as a number, so the generated models send 1.0, which connect-go rejects with 400 on every unary call. A before-request hook rewrites it until the SDK is regenerated from the fixed spec (demo2 #16402).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Connect-Protocol-Version: 1.0, and the server rejects it with400 invalid_argument: Connect-Protocol-Version must be "1": got "1.0", regardless of auth. Reproduced againstapp.textql.comwithchats.get_all.type: number, so the Python model is a float. demo2 #16402 already pins it to the string"1", but the SDK has not been regenerated since._ConnectProtocolVersionHookin_hooks/registration.py(not overwritten by Speakeasy) rewrites1.0to1before each request. It becomes a no-op once the SDK is regenerated from the fixed spec.Release Notes
SDK: Fixed Python SDK calls failing with a 400 error about the Connect protocol version.
Tests
TestConnectProtocolVersionHeader: header sent as1tests/conftest.py.chats.get_allandchats.get_all_async.Connect-Protocol-Version: 1.Checked the sync path locally with an
httpx.MockTransport(header comes out as1); the pytest suite has not been run.