From b0ab2cef65bffd98977668162b7cd059042ea492 Mon Sep 17 00:00:00 2001 From: latan Date: Sun, 17 Sep 2023 14:37:32 +0300 Subject: [PATCH] rollback unnecessary change for error attribute --- docs/dispatcher/errors.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dispatcher/errors.rst b/docs/dispatcher/errors.rst index c079f828..ace9a81b 100644 --- a/docs/dispatcher/errors.rst +++ b/docs/dispatcher/errors.rst @@ -15,13 +15,13 @@ If you specify errors handler for dispatcher - it will be used for all handlers .. code-block:: python - @router.errors(ExceptionTypeFilter(MyCustomException), F.update.message.as_("message")) + @router.error(ExceptionTypeFilter(MyCustomException), F.update.message.as_("message")) async def handle_my_custom_exception(event: ErrorEvent, message: Message): # do something with error await message.answer("Oops, something went wrong!") - @router.errors() + @router.error() async def error_handler(event: ErrorEvent): logger.critical("Critical error caused by %s", event.exception, exc_info=True) # do something with error