Exception classes

django-latch provides a base exception class and two different exception classes to indicate errors occurred during pairing or unpairing a user.

exception django_latch.exceptions.BaseLatchError(message, code=None, params=None)[source]

Base class for errors during latch operation.

This exception will not be raised anywhere, it just serves as a base for the other two exception types.

Parameters:
  • message (str) – A human-readable error message.

  • code (str) – A unique identifier used to distinguish different error causes.

  • params (dict) – Arbitrary key-value data associated with the error.

exception django_latch.exceptions.PairingLatchError(message, code=None, params=None)[source]

Exception class to indicate errors during latch’s pairing.

exception django_latch.exceptions.UnpairingLatchError(message, code=None, params=None)[source]

Exception class to indicate errors during latch’s unpairing.