Skip to content

fix: honor rate limit configuration in all custom actions - #439

Open
pcbeingused333 wants to merge 1 commit into
getlago:mainfrom
pcbeingused333:fix/invoice-rate-limit-config
Open

pcbeingused333 wants to merge 1 commit into
getlago:mainfrom
pcbeingused333:fix/invoice-rate-limit-config

Conversation

@pcbeingused333

Copy link
Copy Markdown

Description

All custom actions across clients should honor the client's rate-limit retry configuration. Many actions omit it when calling the HTTP request helpers, which silently use the default policy instead: disabling retries still sends four requests on HTTP 429, custom retry limits are ignored, and observer callbacks are lost.

Forward self.rate_limit_retry_config in every custom action that omits it, matching the shared CRUD methods and actions that already pass it. This includes events, invoices, customers, subscriptions, plans, wallets and their nested clients, and the remaining custom reporting and resource actions.

Testing

python -m pytest tests -q: 738 passed. Against unchanged main, the same suite produces 217 failed and 521 passed. Parameterized tests exercise every corrected action with retries disabled, zero retries, and a custom retry budget; invoice tests also verify successful response callbacks. HTTP responses are mocked and retry sleeps are disabled.

Submission checklist

  • Duplicate check completed.
  • Changes are on a descriptive fix/ branch.
  • One commit with a descriptive message.
  • Full pytest suite passes.
  • Changes described above; no associated issue to close.

Suggested label: bug.

This change was generated with assistance from OpenAI Codex.

@cla-check-bot

cla-check-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

Welcome back, @pcbeingused333!

It looks like we still need your FLA signature on file. Please sign it here:

Sign the FLA

Once signed, this PR will be automatically updated.

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