Exceptions#

This filters can be helpful for handling errors from the text messages.

class aiogram.filters.exception.ExceptionTypeFilter(*, exception: Union[Type[Exception], Tuple[Type[Exception]]])[source]#

Allows to match exception by type

exception: Union[Type[Exception], Tuple[Type[Exception]]]#

Exception type(s)

class Config[source]#
arbitrary_types_allowed = True#
class aiogram.filters.exception.ExceptionMessageFilter(*, pattern: Union[str, Pattern[str]])[source]#

Allow to match exception by message

pattern: Union[str, Pattern[str]]#

Regexp pattern

class Config[source]#
arbitrary_types_allowed = True#

Allowed handlers#

Allowed update types for this filters:

  • error