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

fix(api): better error message return to the client #86155

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JoshFerge
Copy link
Member

there are many types of snuba rate limits now, and snuba returns them from their API. let's pass them on to the client so at least its more transparent as to what's going on. right now, no matter what, we tell the user to try again in 1 second, while some snuba rate limits operate on windows of 10 minutes, etc.

Also capture the exception so we can better debug this.

@JoshFerge JoshFerge requested review from a team February 28, 2025 23:02
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 28, 2025
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #86155       +/-   ##
===========================================
+ Coverage   46.68%   87.88%   +41.19%     
===========================================
  Files        9698     9712       +14     
  Lines      549884   550541      +657     
  Branches    21441    21441               
===========================================
+ Hits       256731   483829   +227098     
+ Misses     292773    66332   -226441     
  Partials      380      380               

@JoshFerge
Copy link
Member Author

i've changed the PR to not return the message from snuba directly. there is too much internal information, and we should instead construct a message specifically for customers telling them what quota limit they went over, and how long until they can query again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants