linotp.lib.error module

definition of some specific error classes

exception linotp.lib.error.ConfigAdminError(description='config admin error!', id=10)

Bases: LinotpError

exception linotp.lib.error.HSMException(description='hsm error!', id=707)

Bases: LinotpError

exception linotp.lib.error.InvalidFunctionParameter(parameter_name, message)

Bases: Exception

used to signify an invalid function parameter

Example: >>> def foo(bar): >>> raise ArgumentError(‘bar’, ‘invalid bar value’)

exception linotp.lib.error.LinotpError(description='LinotpError!', id=10)

Bases: Exception

getDescription()
getId()
exception linotp.lib.error.ParameterError(description='unspecified parameter error!', id=905)

Bases: LinotpError

exception linotp.lib.error.ProgrammingError

Bases: Exception

exception linotp.lib.error.SelfserviceException(description='selfservice error!', id=807)

Bases: LinotpError

exception linotp.lib.error.ServerError(description='server error!', id=905)

Bases: LinotpError

exception linotp.lib.error.TokenAdminError(description='token admin error!', id=10)

Bases: LinotpError

exception linotp.lib.error.TokenStateError(message)

Bases: UserError

raised by StatefulTokenMixin, if a stateful token got a request that doesn’t fit its internal rollout state

The exception will be mapped into the generic message ‘Unfitting request for this token’ when it gets transported to the API.

exception linotp.lib.error.TokenTypeNotSupportedError(description='this token type is not supported on this setup!', id=906)

Bases: LinotpError

exception linotp.lib.error.UserError(description='user error!', id=905)

Bases: LinotpError

exception linotp.lib.error.ValidateError(description='validation error!', id=10)

Bases: LinotpError