Repository navigation
Fix limit validation and send limit/format in Tables.export_raw - #95
Open
jirkasemmler wants to merge 1 commit into
Open
jirkasemmler wants to merge 1 commit into
jirkasemmler wants to merge 1 commit into
Conversation
The limit check compared the limit against isinstance(table_id, int), so every non-None limit raised ValueError. On top of that, neither limit nor format were ever added to the request body, so even a valid limit would have been silently ignored and the whole table exported. - validate limit as a positive int (bool excluded) - send limit and format in the export-async request - add mock tests asserting the posted body Fixes #66 Supersedes #78 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
jirkasemmler
requested review from
a team and
zajca
and removed request for
a team
September 29, 2026 08:36
zajca
approved these changes
Sep 29, 2026
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.
Why
Tables.export_raw(and thereforeexport/export_to_file) had two related bugs aroundlimit(#66):limit is not isinstance(table_id, int), so every non-None limit raisedValueError.limitandfile_formatwere never put into the request body, so a valid limit would be silently ignored and the whole table exported. That is worse than the current loud failure forexport_to_fileon large tables.What
limitas a positiveint(boolexcluded,0/negative rejected).limitandformatin theexport-asyncPOST body.tests/mocks/test_tables.pyasserting the posted body and the rejected values.Fixes #66. Supersedes #78 (thanks @komackaj for the original fix).
🤖 Generated with Claude Code