From b94b216685f62660258bdb9e52d01f489648a3e4 Mon Sep 17 00:00:00 2001 From: latan Date: Thu, 14 Sep 2023 19:39:50 +0300 Subject: [PATCH] Update method name in docs for error handling --- 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 ace9a81b..c079f828 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.error(ExceptionTypeFilter(MyCustomException), F.update.message.as_("message")) + @router.errors(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.error() + @router.errors() async def error_handler(event: ErrorEvent): logger.critical("Critical error caused by %s", event.exception, exc_info=True) # do something with error