mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-11 07:42:20 -05:00
Add a total-message daily limit (#195)
This commit is contained in:
@@ -18,6 +18,14 @@ class TooManyRequestsError(InvalidRequest):
|
||||
self.message = self.message_template.format(sending_limit)
|
||||
|
||||
|
||||
class TotalRequestsError(InvalidRequest):
|
||||
status_code = 429
|
||||
message_template = 'Exceeded total application limits ({}) for today'
|
||||
|
||||
def __init__(self, sending_limit):
|
||||
self.message = self.message_template.format(sending_limit)
|
||||
|
||||
|
||||
class RateLimitError(InvalidRequest):
|
||||
status_code = 429
|
||||
message_template = 'Exceeded rate limit for key type {} of {} requests per {} seconds'
|
||||
|
||||
Reference in New Issue
Block a user