mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-16 04:05:47 +00:00
Base bot.
This commit is contained in:
parent
3a2fafae2b
commit
23525fd364
7 changed files with 230 additions and 0 deletions
11
aiogram/exceptions.py
Normal file
11
aiogram/exceptions.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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 (Status code: {status}). {message}")
|
||||
self.method = method
|
||||
self.status = status
|
||||
self.body = body
|
||||
Loading…
Add table
Add a link
Reference in a new issue