Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
61e410d24d6de541c86c48b265b7647c164457ee
c250368ba89214c80bc8de3e4fc5d2094c5502cc
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2151
v2152
2 changes: 0 additions & 2 deletions stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,6 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data):
code,
)
# switchCases: The beginning of the section generated from our OpenAPI spec
elif type == "rate_limit":
return error.RateLimitError(**error_args)
elif type == "temporary_session_expired":
return error.TemporarySessionExpiredError(**error_args)
# switchCases: The end of the section generated from our OpenAPI spec
Expand Down
25 changes: 0 additions & 25 deletions tests/test_generated_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -44145,31 +44145,6 @@ def test_v2_core_event_destination_post_5_service(
is_json=True,
)

def test_rate_limit_error_service(
self, http_client_mock: HTTPClientMock
) -> None:
http_client_mock.stub_request(
"get",
"/v2/core/accounts",
rbody='{"error":{"type":"rate_limit","code":"account_rate_limit_exceeded"}}',
rcode=400,
)
client = StripeClient(
"sk_test_123",
http_client=http_client_mock.get_mock_http_client(),
)

try:
client.v2.core.accounts.list()
except _error.RateLimitError:
pass
http_client_mock.assert_requested(
"get",
path="/v2/core/accounts",
query_string="",
api_base="https://api.stripe.com",
)

def test_temporary_session_expired_error_service(
self, http_client_mock: HTTPClientMock
) -> None:
Expand Down