-
Notifications
You must be signed in to change notification settings - Fork 216
Add rate-limit/cooldown to Stripe API requests after 401 errors #4497
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
Merged
diegocurbelo
merged 19 commits into
develop
from
fix/586-disable-gateway-after-several-401-responses
Jul 24, 2025
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
41de8e7
Use the Database_Cache as rate limit for the 401 error count
diegocurbelo 1354832
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
diegocurbelo 909c225
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
diegocurbelo 32ffb02
Add tests
diegocurbelo a850c7a
Reset invalid keys cache after reconnect
diegocurbelo 7427d30
Add changelog
diegocurbelo 5339657
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
diegocurbelo c0819cd
Invalidate Account Data cache when in 401 cooldown
diegocurbelo 1a02f9c
Only log an error once after reaching the attempt limit; and include …
diegocurbelo 3923138
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
diegocurbelo 8773570
Apply suggestions from code review
diegocurbelo dd3ea04
Rename constant prefix to INVALID_API_KEY_ERROR_COUNT
diegocurbelo c144129
Make the threshold and timeout constants protected
diegocurbelo 5fda329
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
diegocurbelo e4a110d
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
diegocurbelo 976886a
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
daledupreez 08c936f
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
daledupreez e1be70a
Merge branch 'develop' into fix/586-disable-gateway-after-several-401…
diegocurbelo 2c492ce
Fix tests
diegocurbelo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking, but do we want to confirm we got a 2xx response code before we clear this cache? I don't think it's a big thing either way, but clearing the cache for any non-401 response feels like it may be the wrong approach in some situations, e.g. 500 or 403 responses.