We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9249f6f commit 8b46dd8Copy full SHA for 8b46dd8
1 file changed
xbox/webapi/common/exceptions.py
@@ -3,6 +3,9 @@
3
"""
4
5
6
+from xbox.webapi.common.ratelimits import RateLimit
7
+
8
9
class XboxException(Exception):
10
"""Base exception for all Xbox exceptions to subclass"""
11
@@ -46,3 +49,10 @@ class NotFoundException(XboxException):
46
49
"""Any exception raised due to a resource being missing will subclass this"""
47
50
48
51
pass
52
53
54
+class RateLimitExceededException(XboxException):
55
+ def __init__(self, message, rate_limit: RateLimit):
56
+ self.message = message
57
+ self.rate_limit = rate_limit
58
+ self.try_again_in = rate_limit.get_reset_after()
0 commit comments