Skip to content

Errors

BaseTWAError

Bases: Exception

Base class for all TWA-related exceptions.

Source code in telegram_webapp_auth/errors.py
1
2
3
4
class BaseTWAError(Exception):
    """Base class for all TWA-related exceptions."""

    pass

ExpiredInitDataError

Bases: BaseTWAError

Raised when the init data has expired.

Source code in telegram_webapp_auth/errors.py
class ExpiredInitDataError(BaseTWAError):
    """Raised when the init data has expired."""

    pass

InvalidInitDataError

Bases: BaseTWAError

Raised when the init data is invalid.

Source code in telegram_webapp_auth/errors.py
class InvalidInitDataError(BaseTWAError):
    """Raised when the init data is invalid."""

    pass