-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Currently, scrimmage rate limiting is based on the number of ranked scrimmage matches run in the past hour. In addition, we enforce a limitation on the number of active scrimmages a team can perform against another team at once. I think we should tweak this system as follows:
-
prevent a team from challenging a team ranked below them (lower rating) to a ranked scrimmage (create a new error variant)
-
tweak our rate limit calculation in
Team.can_scrimmage(...)to be based on the team's activeScrimmageRequestsin the past hour (seeactive_statusesinScrimmageRequestViewSet.create(...)<-- we should ask the AI if there is a way to re-use the ScrimmageRequest and Match querysets across both the rate limit and "too many scrimmage" checks (if you don't parse this then just remind me after your first pass to follow back up on this) -
in addition, we should ensure that these custom
APIExceptionlikeRankedMatchesDisabedactually propagate their error messages through to the frontend and not mysterious ones like "an error occurred"