Skip to content

fix: stop sending the options argument as a query parameter - #8

Draft
chipkent wants to merge 1 commit into
masterfrom
fix/rest-options-param
Draft

chipkent wants to merge 1 commit into
masterfrom
fix/rest-options-param

Conversation

@chipkent

@chipkent chipkent commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Preview only. This is a draft in the fork showing the exact text of the PR planned for massive-com/client-python. It will be closed, not merged, once the upstream PR is opened.

Fixes #<issue: F8>

BaseClient._get_params builds query parameters from the calling method's locals(). It skips params and raw but not options, so a call such as

client.get_ticker_details("AAPL", options=RequestOptionBuilder(edge_id="x"))

also sends ?options=<massive.rest.models.request.RequestOptionBuilder object at 0x...>.

  • Add "options" to the skip list. Every endpoint goes through _get_params, so this fixes them all.
  • The headers from options are applied exactly as before.
  • Two regression tests (a GET and a paginated list) check the query string pook recorded. They fail without the fix.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@chipkent chipkent changed the title fix(rest): stop sending the options argument as a query parameter fix: stop sending the options argument as a query parameter Oct 24, 2026
@chipkent
chipkent force-pushed the fix/rest-options-param branch from 5aaea8a to 3989989 Compare October 24, 2026 04:48
BaseClient._get_params turns a method's locals() into query parameters,
skipping only `params` and `raw`. It did not skip `options`, so any REST
method called with a RequestOptionBuilder also sent
`options=<massive.rest.models.request.RequestOptionBuilder object at ...>`
in the query string.

Skip `options` too. Every endpoint builds its query through _get_params,
so this fixes them all. Add regression tests for a GET and a paginated
list call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant