PyFlowery/pyflowery/exceptions.py
cswimr 7b0b13604b
All checks were successful
Actions / build (push) Successful in 21s
Actions / lint (push) Successful in 18s
(1.0.4) pylint fixes
2024-09-17 23:31:50 -04:00

19 lines
616 B
Python

class InternalServerError(Exception):
"""Raised when the API returns a 5xx status code"""
def __init__(self, message):
self.message = message
class ClientError(Exception):
"""Raised when the API returns a 4xx status code"""
def __init__(self, message):
self.message = message
class TooManyRequests(Exception):
"""Raised when the API returns a 429 status code"""
def __init__(self, message):
self.message = message
class RetryLimitExceeded(Exception):
"""Raised when the retry limit is exceeded"""
def __init__(self, message):
self.message = message