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

source-braintree-native: concatenate search limit error message #2193

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions source-braintree-native/source_braintree_native/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@


def _search_limit_error_message(count: int, name: str) -> str:
msg = f"{count} {name} returned in a single search which is "
f"greater than or equal to Braintree's documented maximum for a single {name} search. "
"Reduce the window size and backfill this stream."
msg = (
f"{count} {name} returned in a single search which is "
f"greater than or equal to Braintree's documented maximum for a single {name} search. "
"Reduce the window size and backfill this stream."
)

return msg

Expand Down Expand Up @@ -73,7 +75,7 @@ def _braintree_object_to_dict(braintree_object):
data.pop('_setattrs', None)
return data


# TODO(bair): Refactor snapshot_ and fetch_ functions to make asynchronous API requests instead of synchronous requests.
async def snapshot_resources(
braintree_gateway: BraintreeGateway,
gateway_property: str,
Expand Down
Loading