-
-
Notifications
You must be signed in to change notification settings - Fork 61
fix(api): add quota allowance to clickhouse errors #7392
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
base: master
Are you sure you want to change the base?
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
12793ed to
64cc915
Compare
|
|
||
| @property | ||
| def quota_allowance(self) -> dict[str, Any]: | ||
| return cast(dict[str, Any], self.extra_data.get("quota_allowance", {})) |
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.
i'm not super happy about my approach to fix the type, open to any suggestions. the problem is that ClickhouseErrors errors have quota_allowance, but RateLimitExceeded errors have it on extra_data, so it's tricky to add the property to the RateLimitExceeded errors we want without doing some type wrangling
In getsentry/sentry#96151 (comment), we saw a small issue where for the max byte scanning policies, we didn't return a
quota_allowancein the API response since we were overwriting the original error. This manually puts thequota_allowanceback on.