aiogram/aiogram/exceptions.py
Alex Root Junior 07c7c1f32a Refactoring.
2017-06-02 03:01:28 +03:00

11 lines
341 B
Python

class ValidationError(Exception):
pass
class TelegramAPIError(Exception):
def __init__(self, message, method, status, body):
super(TelegramAPIError, self).__init__(
f"A request to the Telegram API was unsuccessful.\n{message}")
self.method = method
self.status = status
self.body = body