Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add rate limit headers to base exceptions#145

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tsalpekar21 wants to merge1 commit intoGetStream:master
base:master
Choose a base branch
Loading
fromtsalpekar21:feat_rate_limit_exceptions

Conversation

@tsalpekar21
Copy link

@tsalpekar21tsalpekar21 commentedJul 21, 2023
edited
Loading

Submit a pull request

CLA

  • I have signed theStream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

When I was implementing some bulk Stream chat operations, I ran into some rate limits and was going to implement a rate limit reset handler. Upon building that, I realized the StreamAPIException that's thrown when a developer gets rate limited doesn't contain details about the rate limit, even though the StreamResponse contains a very niceRateLimitInfo object.

It'd be great to have the rate limit details exist in the StreamAPIException that gets thrown when we actually hit the error. That way, the developer can get the details (like when the rate limit resets), right in theexcept handler and wait accordingly.

Everything should be backwards-compatible. The design choice was inspired by StreamResponse also inheriting fromdict.

PS, I've never contributed to a public repo before so lmk if I've missed anything!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gumuzgumuzAwaiting requested review from gumuz

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@tsalpekar21

[8]ページ先頭

©2009-2025 Movatter.jp