modal.exception

modal.exception.AuthError

class AuthError(modal.exception.Error)

Raised when a client has missing or invalid authentication.

modal.exception.ConnectionError

class ConnectionError(modal.exception.Error)

Raised when an issue occurs while connecting to the Modal servers.

modal.exception.DeprecationError

class DeprecationError(UserWarning)

UserWarning category emitted when a deprecated Modal feature or API is used.

modal.exception.ExecutionError

class ExecutionError(modal.exception.Error)

Raised when something unexpected happened during runtime.

modal.exception.InvalidError

class InvalidError(modal.exception.Error)

Raised when user does something invalid.

modal.exception.NotFoundError

class NotFoundError(modal.exception.Error)

Raised when a requested resource was not found.

modal.exception.PendingDeprecationError

class PendingDeprecationError(UserWarning)

Soon to be deprecated feature. Only used intermittently because of multi-repo concerns.

modal.exception.RemoteError

class RemoteError(modal.exception.Error)

Raised when an error occurs on the Modal server.

modal.exception.TimeoutError

class TimeoutError(modal.exception.Error)

Raised when a Function exceeds its execution duration limit and times out.

modal.exception.VersionError

class VersionError(modal.exception.Error)

Raised when the current client version of Modal is unsupported.

modal.exception.deprecation_error

def deprecation_error(deprecated_on: date, msg: str):

modal.exception.deprecation_warning

def deprecation_warning(deprecated_on: date, msg: str, pending=False):

Utility for getting the proper stack entry.

See the implementation of the built-in warnings.warn.