HomeHarvest/homeharvest/exceptions.py

15 lines
466 B
Python
Raw Permalink Normal View History

2023-09-15 15:17:37 -07:00
class InvalidListingType(Exception):
"""Raised when a provided listing type is does not exist."""
2023-09-17 13:06:31 -07:00
2024-04-16 12:55:44 -07:00
2023-11-03 16:35:41 -07:00
class InvalidDate(Exception):
2024-04-16 12:55:44 -07:00
"""Raised when only one of date_from or date_to is provided or not in the correct format. ex: 2023-10-23"""
class AuthenticationError(Exception):
"""Raised when there is an issue with the authentication process."""
def __init__(self, *args, response):
super().__init__(*args)
self.response = response