mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
605 B
605 B
ErrorHandler
There is base class for error handlers.
Simple usage:
from aiogram.handlers import ErrorHandler
...
@router.errors_handler()
class MyHandler(ErrorHandler):
async def handle(self) -> Any:
log.exception(
"Cause unexpected exception %s: %s",
self.event.__class__.__name__,
self.event
)
Extension
This base handler is subclass of BaseHandler