1
0
mirror of https://github.com/ihabunek/toot synced 2024-12-23 15:37:47 +01:00
Toot-Mastodon-CLI-TUI-clien.../toot/exceptions.py

18 lines
403 B
Python
Raw Normal View History

2023-11-26 18:00:57 +01:00
from click import ClickException
class ApiError(ClickException):
2017-12-30 13:32:52 +01:00
"""Raised when an API request fails for whatever reason."""
class NotFoundError(ApiError):
"""Raised when an API requests returns a 404."""
class AuthenticationError(ApiError):
"""Raised when login fails."""
2023-11-26 18:00:57 +01:00
class ConsoleError(ClickException):
2017-12-30 13:32:52 +01:00
"""Raised when an error occurs which needs to be show to the user."""