irpc package

Submodules

irpc.errors module

Contains IRPC-related exceptions.

exception irpc.errors.IRPCAppError(msg=None, *args, errno=None, **kwargs)

Bases: irpc.errors.IRPCError

Unknown (generic) error.

Also serves as a common base for all IRPC Errors respond to clients.

errno

Error number

Type

int

msg

Error description message

Type

Optional[str]

Each Error must have at least an errno provided. Error numbers from -100 to -1 are reserved and should not be used by a user.

classmethod __init_subclass__(check_errnos=True)

Require that every errno is unique and subclass does provide a default for it, unless a check_errnos argument set to False during subclassing.

__repr__()

Fancy representation.

errno = -1
msg = None
exception irpc.errors.IRPCArgumentError(msg=None, *args, errno=None, **kwargs)

Bases: irpc.errors.IRPCAppError

Indicates IRPC transport is probably ok, but the method was called with wrong arguments.

errno = -4
exception irpc.errors.IRPCAuthError(msg=None, *args, errno=None, **kwargs)

Bases: irpc.errors.IRPCAppError

Common authentification error serving numerous purposes.

We don’t need to be to specific on errors since we don’t want to disclose useful information to an attacker.

errno = -6
exception irpc.errors.IRPCBuildError

Bases: irpc.errors.IRPCError

Used for all exceptions related to IRPC declarations building process.

exception irpc.errors.IRPCError

Bases: Exception

Common base class for all IRPC exceptions.

exception irpc.errors.IRPCExpiredError(msg=None, *args, errno=None, **kwargs)

Bases: irpc.errors.IRPCAppError

Denotes some resource is already expired.

errno = -5
exception irpc.errors.IRPCFormatError(msg=None, *args, errno=None, **kwargs)

Bases: irpc.errors.IRPCAppError

Indicates IPRC request has wrong format.

errno = -2
exception irpc.errors.IRPCNotFoundError(msg=None, *args, errno=None, **kwargs)

Bases: irpc.errors.IRPCAppError

Indicates requested IRPC method or other resource was not found in endpoint.

errno = -3

irpc.irpc module

Module contents