Skip to content

Commit 8902982

Browse files
authored
Update errors.py
1 parent 299f32a commit 8902982

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎app/controllers/errors.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ class PayloadTooLarge(DomainError):
6161
status_code = 413
6262

6363

64+
class PaymentRequired(DomainError):
65+
"""The user has exhausted their token/spend budget (402).
66+
67+
The billing kill-switch: raised before a cost-incurring run starts
68+
when the usage ledger shows the user is at or over their allotment.
69+
"""
70+
71+
status_code = 402
72+
73+
6474
class TooManyRequests(DomainError):
6575
"""Rate limit exceeded (429).
6676

0 commit comments

Comments
 (0)