mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update a warning message in dispatcher
Enhanced the warning message in aiogram/dispatcher/dispatcher.py to include a JSON dump of the update. This change helps to give clearer and more detailed information on why an update type is unknown by including the specifics of what the update contains.
This commit is contained in:
parent
2093b45799
commit
4d4d3dfc06
1 changed files with 2 additions and 1 deletions
|
|
@ -264,7 +264,8 @@ class Dispatcher(Router):
|
|||
warnings.warn(
|
||||
"Detected unknown update type.\n"
|
||||
"Seems like Telegram Bot API was updated and you have "
|
||||
"installed not latest version of aiogram framework",
|
||||
"installed not latest version of aiogram framework"
|
||||
f"\nUpdate: {update.model_dump_json(exclude_unset=True)}",
|
||||
RuntimeWarning,
|
||||
)
|
||||
raise SkipHandler() from e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue