Exceptions

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

class aiogram.filters.exception.ExceptionTypeFilter(*exceptions: Type[Exception])[source]

Allows to match exception by type

exceptions
class aiogram.filters.exception.ExceptionMessageFilter(pattern: str | Pattern[str])[source]

Allow to match exception by message

pattern

Allowed handlers

Allowed update types for this filters:

  • error